atstk1002.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * ATSTK1002 daughterboard-specific init code
  3. *
  4. * Copyright (C) 2005-2006 Atmel Corporation
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <linux/init.h>
  11. #include <asm/arch/board.h>
  12. #include <asm/arch/init.h>
  13. struct eth_platform_data __initdata eth0_data = {
  14. .valid = 1,
  15. .mii_phy_addr = 0x10,
  16. .is_rmii = 0,
  17. .hw_addr = { 0x6a, 0x87, 0x71, 0x14, 0xcd, 0xcb },
  18. };
  19. extern struct lcdc_platform_data atstk1000_fb0_data;
  20. void __init setup_board(void)
  21. {
  22. at32_map_usart(1, 0); /* /dev/ttyS0 */
  23. at32_map_usart(2, 1); /* /dev/ttyS1 */
  24. at32_map_usart(3, 2); /* /dev/ttyS2 */
  25. at32_setup_serial_console(0);
  26. }
  27. static int __init atstk1002_init(void)
  28. {
  29. at32_add_system_devices();
  30. at32_add_device_usart(0);
  31. at32_add_device_usart(1);
  32. at32_add_device_usart(2);
  33. at32_add_device_eth(0, &eth0_data);
  34. at32_add_device_spi(0);
  35. at32_add_device_lcdc(0, &atstk1000_fb0_data);
  36. return 0;
  37. }
  38. postcore_initcall(atstk1002_init);