aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorStanley.Miao <stanley.miao@windriver.com>2008-12-10 20:36:53 -0500
committerTony Lindgren <tony@atomide.com>2008-12-10 20:36:53 -0500
commitb1c056d20caa6fdd3481b348567f1f91e98aaa4b (patch)
treeb4c3dace2722580f9f4b47103b89339431b07447 /arch/arm
parentad636ad84e059e714013e009f76878b888de1f09 (diff)
ARM: OMAP3: LDP: Add Ethernet device support to make ldp boot succeess
Add Ethernet device support in board-ldp.c to make ldp can boot and mount nfs successfully. Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/configs/omap_ldp_defconfig148
-rw-r--r--arch/arm/mach-omap2/board-ldp.c57
-rw-r--r--arch/arm/plat-omap/include/mach/board-ldp.h5
3 files changed, 208 insertions, 2 deletions
diff --git a/arch/arm/configs/omap_ldp_defconfig b/arch/arm/configs/omap_ldp_defconfig
index 948a212fb1cc..b77d054169ee 100644
--- a/arch/arm/configs/omap_ldp_defconfig
+++ b/arch/arm/configs/omap_ldp_defconfig
@@ -316,7 +316,82 @@ CONFIG_BINFMT_MISC=y
316# 316#
317# CONFIG_PM is not set 317# CONFIG_PM is not set
318CONFIG_ARCH_SUSPEND_POSSIBLE=y 318CONFIG_ARCH_SUSPEND_POSSIBLE=y
319# CONFIG_NET is not set 319CONFIG_NET=y
320
321#
322# Networking options
323#
324CONFIG_PACKET=y
325# CONFIG_PACKET_MMAP is not set
326CONFIG_UNIX=y
327CONFIG_XFRM=y
328CONFIG_XFRM_USER=y
329# CONFIG_XFRM_SUB_POLICY is not set
330CONFIG_XFRM_MIGRATE=y
331# CONFIG_XFRM_STATISTICS is not set
332CONFIG_NET_KEY=y
333CONFIG_NET_KEY_MIGRATE=y
334CONFIG_INET=y
335CONFIG_IP_MULTICAST=y
336# CONFIG_IP_ADVANCED_ROUTER is not set
337CONFIG_IP_FIB_HASH=y
338CONFIG_IP_PNP=y
339CONFIG_IP_PNP_DHCP=y
340CONFIG_IP_PNP_BOOTP=y
341CONFIG_IP_PNP_RARP=y
342# CONFIG_NET_IPIP is not set
343# CONFIG_NET_IPGRE is not set
344# CONFIG_IP_MROUTE is not set
345# CONFIG_ARPD is not set
346# CONFIG_SYN_COOKIES is not set
347# CONFIG_INET_AH is not set
348# CONFIG_INET_ESP is not set
349# CONFIG_INET_IPCOMP is not set
350# CONFIG_INET_XFRM_TUNNEL is not set
351# CONFIG_INET_TUNNEL is not set
352CONFIG_INET_XFRM_MODE_TRANSPORT=y
353CONFIG_INET_XFRM_MODE_TUNNEL=y
354CONFIG_INET_XFRM_MODE_BEET=y
355# CONFIG_INET_LRO is not set
356CONFIG_INET_DIAG=y
357CONFIG_INET_TCP_DIAG=y
358# CONFIG_TCP_CONG_ADVANCED is not set
359CONFIG_TCP_CONG_CUBIC=y
360CONFIG_DEFAULT_TCP_CONG="cubic"
361# CONFIG_TCP_MD5SIG is not set
362# CONFIG_IPV6 is not set
363# CONFIG_NETWORK_SECMARK is not set
364# CONFIG_NETFILTER is not set
365# CONFIG_IP_DCCP is not set
366# CONFIG_IP_SCTP is not set
367# CONFIG_TIPC is not set
368# CONFIG_ATM is not set
369# CONFIG_BRIDGE is not set
370# CONFIG_NET_DSA is not set
371# CONFIG_VLAN_8021Q is not set
372# CONFIG_DECNET is not set
373# CONFIG_LLC2 is not set
374# CONFIG_IPX is not set
375# CONFIG_ATALK is not set
376# CONFIG_X25 is not set
377# CONFIG_LAPB is not set
378# CONFIG_ECONET is not set
379# CONFIG_WAN_ROUTER is not set
380# CONFIG_NET_SCHED is not set
381
382#
383# Network testing
384#
385# CONFIG_NET_PKTGEN is not set
386# CONFIG_HAMRADIO is not set
387# CONFIG_CAN is not set
388# CONFIG_IRDA is not set
389# CONFIG_BT is not set
390# CONFIG_AF_RXRPC is not set
391# CONFIG_PHONET is not set
392# CONFIG_WIRELESS is not set
393# CONFIG_RFKILL is not set
394# CONFIG_NET_9P is not set
320 395
321# 396#
322# Device Drivers 397# Device Drivers
@@ -332,6 +407,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
332# CONFIG_DEBUG_DRIVER is not set 407# CONFIG_DEBUG_DRIVER is not set
333# CONFIG_DEBUG_DEVRES is not set 408# CONFIG_DEBUG_DEVRES is not set
334# CONFIG_SYS_HYPERVISOR is not set 409# CONFIG_SYS_HYPERVISOR is not set
410CONFIG_CONNECTOR=y
411CONFIG_PROC_EVENTS=y
335# CONFIG_MTD is not set 412# CONFIG_MTD is not set
336# CONFIG_PARPORT is not set 413# CONFIG_PARPORT is not set
337CONFIG_BLK_DEV=y 414CONFIG_BLK_DEV=y
@@ -390,6 +467,54 @@ CONFIG_SCSI_LOWLEVEL=y
390# CONFIG_SCSI_DH is not set 467# CONFIG_SCSI_DH is not set
391# CONFIG_ATA is not set 468# CONFIG_ATA is not set
392# CONFIG_MD is not set 469# CONFIG_MD is not set
470CONFIG_NETDEVICES=y
471# CONFIG_DUMMY is not set
472# CONFIG_BONDING is not set
473# CONFIG_MACVLAN is not set
474# CONFIG_EQUALIZER is not set
475# CONFIG_TUN is not set
476# CONFIG_VETH is not set
477# CONFIG_PHYLIB is not set
478CONFIG_NET_ETHERNET=y
479CONFIG_MII=y
480# CONFIG_AX88796 is not set
481# CONFIG_SMC91X is not set
482# CONFIG_DM9000 is not set
483# CONFIG_ENC28J60 is not set
484CONFIG_SMC911X=y
485# CONFIG_IBM_NEW_EMAC_ZMII is not set
486# CONFIG_IBM_NEW_EMAC_RGMII is not set
487# CONFIG_IBM_NEW_EMAC_TAH is not set
488# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
489# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
490# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
491# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
492# CONFIG_B44 is not set
493CONFIG_NETDEV_1000=y
494CONFIG_NETDEV_10000=y
495
496#
497# Wireless LAN
498#
499# CONFIG_WLAN_PRE80211 is not set
500# CONFIG_WLAN_80211 is not set
501# CONFIG_IWLWIFI_LEDS is not set
502
503#
504# USB Network Adapters
505#
506# CONFIG_USB_CATC is not set
507# CONFIG_USB_KAWETH is not set
508# CONFIG_USB_PEGASUS is not set
509# CONFIG_USB_RTL8150 is not set
510# CONFIG_USB_USBNET is not set
511# CONFIG_WAN is not set
512# CONFIG_PPP is not set
513# CONFIG_SLIP is not set
514# CONFIG_NETCONSOLE is not set
515# CONFIG_NETPOLL is not set
516# CONFIG_NET_POLL_CONTROLLER is not set
517# CONFIG_ISDN is not set
393 518
394# 519#
395# Input device support 520# Input device support
@@ -816,6 +941,27 @@ CONFIG_TMPFS=y
816# CONFIG_ROMFS_FS is not set 941# CONFIG_ROMFS_FS is not set
817# CONFIG_SYSV_FS is not set 942# CONFIG_SYSV_FS is not set
818# CONFIG_UFS_FS is not set 943# CONFIG_UFS_FS is not set
944CONFIG_NETWORK_FILESYSTEMS=y
945CONFIG_NFS_FS=y
946CONFIG_NFS_V3=y
947CONFIG_NFS_V3_ACL=y
948CONFIG_NFS_V4=y
949CONFIG_ROOT_NFS=y
950# CONFIG_NFSD is not set
951CONFIG_LOCKD=y
952CONFIG_LOCKD_V4=y
953CONFIG_NFS_ACL_SUPPORT=y
954CONFIG_NFS_COMMON=y
955CONFIG_SUNRPC=y
956CONFIG_SUNRPC_GSS=y
957# CONFIG_SUNRPC_REGISTER_V4 is not set
958CONFIG_RPCSEC_GSS_KRB5=y
959# CONFIG_RPCSEC_GSS_SPKM3 is not set
960# CONFIG_SMB_FS is not set
961# CONFIG_CIFS is not set
962# CONFIG_NCP_FS is not set
963# CONFIG_CODA_FS is not set
964# CONFIG_AFS_FS is not set
819 965
820# 966#
821# Partition Types 967# Partition Types
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 1ea59986aa7a..43c7ac4b7f8f 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -38,11 +38,67 @@
38#include <asm/delay.h> 38#include <asm/delay.h>
39#include <mach/control.h> 39#include <mach/control.h>
40 40
41#define SDP3430_SMC91X_CS 3
42
43static struct resource ldp_smc911x_resources[] = {
44 [0] = {
45 .start = OMAP34XX_ETHR_START,
46 .end = OMAP34XX_ETHR_START + SZ_4K,
47 .flags = IORESOURCE_MEM,
48 },
49 [1] = {
50 .start = 0,
51 .end = 0,
52 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
53 },
54};
55
56static struct platform_device ldp_smc911x_device = {
57 .name = "smc911x",
58 .id = -1,
59 .num_resources = ARRAY_SIZE(ldp_smc911x_resources),
60 .resource = ldp_smc911x_resources,
61};
62
63static struct platform_device *ldp_devices[] __initdata = {
64 &ldp_smc911x_device,
65};
66
67static inline void __init ldp_init_smc911x(void)
68{
69 int eth_cs;
70 unsigned long cs_mem_base;
71 int eth_gpio = 0;
72
73 eth_cs = LDP_SMC911X_CS;
74
75 if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) {
76 printk(KERN_ERR "Failed to request GPMC mem for smc911x\n");
77 return;
78 }
79
80 ldp_smc911x_resources[0].start = cs_mem_base + 0x0;
81 ldp_smc911x_resources[0].end = cs_mem_base + 0xf;
82 udelay(100);
83
84 eth_gpio = LDP_SMC911X_GPIO;
85
86 ldp_smc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio);
87
88 if (omap_request_gpio(eth_gpio) < 0) {
89 printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n",
90 eth_gpio);
91 return;
92 }
93 gpio_direction_input(eth_gpio);
94}
95
41static void __init omap_ldp_init_irq(void) 96static void __init omap_ldp_init_irq(void)
42{ 97{
43 omap2_init_common_hw(); 98 omap2_init_common_hw();
44 omap_init_irq(); 99 omap_init_irq();
45 omap_gpio_init(); 100 omap_gpio_init();
101 ldp_init_smc911x();
46} 102}
47 103
48static struct omap_uart_config ldp_uart_config __initdata = { 104static struct omap_uart_config ldp_uart_config __initdata = {
@@ -64,6 +120,7 @@ static int __init omap_i2c_init(void)
64static void __init omap_ldp_init(void) 120static void __init omap_ldp_init(void)
65{ 121{
66 omap_i2c_init(); 122 omap_i2c_init();
123 platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices));
67 omap_board_config = ldp_config; 124 omap_board_config = ldp_config;
68 omap_board_config_size = ARRAY_SIZE(ldp_config); 125 omap_board_config_size = ARRAY_SIZE(ldp_config);
69 omap_serial_init(); 126 omap_serial_init();
diff --git a/arch/arm/plat-omap/include/mach/board-ldp.h b/arch/arm/plat-omap/include/mach/board-ldp.h
index 66e2746c04ca..f23399665212 100644
--- a/arch/arm/plat-omap/include/mach/board-ldp.h
+++ b/arch/arm/plat-omap/include/mach/board-ldp.h
@@ -32,5 +32,8 @@
32extern void twl4030_bci_battery_init(void); 32extern void twl4030_bci_battery_init(void);
33 33
34#define TWL4030_IRQNUM INT_34XX_SYS_NIRQ 34#define TWL4030_IRQNUM INT_34XX_SYS_NIRQ
35 35#define LDP_SMC911X_CS 1
36#define LDP_SMC911X_GPIO 152
37#define DEBUG_BASE 0x08000000
38#define OMAP34XX_ETHR_START DEBUG_BASE
36#endif /* __ASM_ARCH_OMAP_LDP_H */ 39#endif /* __ASM_ARCH_OMAP_LDP_H */