board-tcc8000-sdk.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (C) 2009 Hans J. Koch <hjk@linutronix.de>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include <linux/init.h>
  9. #include <linux/kernel.h>
  10. #include <linux/platform_device.h>
  11. #include <asm/mach-types.h>
  12. #include <asm/mach/arch.h>
  13. #include <asm/mach/map.h>
  14. #include <asm/mach/time.h>
  15. #include <mach/clock.h>
  16. #include <mach/tcc-nand.h>
  17. #include "common.h"
  18. #define XI_FREQUENCY 12000000
  19. #define XTI_FREQUENCY 32768
  20. #ifdef CONFIG_MTD_NAND_TCC
  21. /* NAND */
  22. static struct tcc_nand_platform_data tcc8k_sdk_nand_data = {
  23. .width = 1,
  24. .hw_ecc = 0,
  25. };
  26. #endif
  27. static void __init tcc8k_init(void)
  28. {
  29. #ifdef CONFIG_MTD_NAND_TCC
  30. tcc_nand_device.dev.platform_data = &tcc8k_sdk_nand_data;
  31. platform_device_register(&tcc_nand_device);
  32. #endif
  33. }
  34. static void __init tcc8k_init_timer(void)
  35. {
  36. tcc_clocks_init(XI_FREQUENCY, XTI_FREQUENCY);
  37. }
  38. static struct sys_timer tcc8k_timer = {
  39. .init = tcc8k_init_timer,
  40. };
  41. static void __init tcc8k_map_io(void)
  42. {
  43. tcc8k_map_common_io();
  44. }
  45. MACHINE_START(TCC8000_SDK, "Telechips TCC8000-SDK Demo Board")
  46. .boot_params = PHYS_OFFSET + 0x00000100,
  47. .map_io = tcc8k_map_io,
  48. .init_irq = tcc8k_init_irq,
  49. .init_machine = tcc8k_init,
  50. .timer = &tcc8k_timer,
  51. MACHINE_END