board-tcc8000-sdk.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 "common.h"
  17. #define XI_FREQUENCY 12000000
  18. #define XTI_FREQUENCY 32768
  19. #ifdef CONFIG_MTD_NAND_TCC
  20. /* NAND */
  21. static struct tcc_nand_platform_data tcc8k_sdk_nand_data = {
  22. .width = 1,
  23. .hw_ecc = 0,
  24. };
  25. #endif
  26. static void __init tcc8k_init(void)
  27. {
  28. #ifdef CONFIG_MTD_NAND_TCC
  29. tcc_nand_device.dev.platform_data = &tcc8k_sdk_nand_data;
  30. platform_device_register(&tcc_nand_device);
  31. #endif
  32. }
  33. static void __init tcc8k_init_timer(void)
  34. {
  35. tcc_clocks_init(XI_FREQUENCY, XTI_FREQUENCY);
  36. }
  37. static struct sys_timer tcc8k_timer = {
  38. .init = tcc8k_init_timer,
  39. };
  40. static void __init tcc8k_map_io(void)
  41. {
  42. tcc8k_map_common_io();
  43. }
  44. MACHINE_START(TCC8000_SDK, "Telechips TCC8000-SDK Demo Board")
  45. .boot_params = PLAT_PHYS_OFFSET + 0x00000100,
  46. .map_io = tcc8k_map_io,
  47. .init_irq = tcc8k_init_irq,
  48. .init_machine = tcc8k_init,
  49. .timer = &tcc8k_timer,
  50. MACHINE_END