RE: [PATCH] ARM: OMAP: Add minimal OMAP2430 support

Woodruff, Richard
2006-05-18T12:30:05Z

Our current internal tree one does the following in board_2430.c for
ether.

void sdp_reset (void)
{
#define LAN_RESET_REGISTER (H4_DEBUG_FPGA_VA_BASE+0x1c)
int cnt = 20;

__raw_writew(0x0, LAN_RESET_REGISTER);
do {
__raw_writew(0x1, LAN_RESET_REGISTER);
udelay (100);
if(cnt == 0)
goto sdp_reset_err_out;
--cnt;
} while (__raw_readw(LAN_RESET_REGISTER) != 0x1);

cnt = 20;

do {
__raw_writew(0x0, LAN_RESET_REGISTER);
udelay (100);
if(cnt == 0)
goto sdp_reset_err_out;
--cnt;
} while (__raw_readw(LAN_RESET_REGISTER) != 0x0000);
udelay (400);
sdp_reset_err_out:
return;
}

static int __init smc91x_init(void)
{
sdp_reset();

if ((omap_request_gpio(ETH_GPIO)) < 0) {
printk("%s: unable to request GPIO for smc91x\n",
__FUNCTION__);
return -1;
} else {
omap_set_gpio_direction(ETH_GPIO, OMAP24XX_DIR_INPUT);
omap_set_gpio_edge_ctrl(ETH_GPIO, OMAP_GPIO_LEVEL_LOW);
}
return 0;
}

static struct resource smc91x_resources[] = {
[0] = {
.start = OMAP24xx_ETHR_BASE, /* Physical */
.end = OMAP24xx_ETHR_BASE + SZ_4K,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = INT_ETHER,
.end = 0,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device smc91x_device = {
.name = "smc91x",
.id = 0,
.num_resources = ARRAY_SIZE(smc91x_resources),
.resource = smc91x_resources,
};

-----Original Message-----
From: linux-omap-open-source-bounces+r-woodruff2=ti.com@linux.omap.com
[mailto:linux-omap-open-source-bounces+r-woodruff2=ti.com@linux.omap.com
] On Behalf Of Komal Shah
Sent: Thursday, May 18, 2006 6:45 AM
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH] ARM: OMAP: Add minimal OMAP2430 support

Tony/Richard,

* NFS is still not working. NETDEV Watchdog timeouts.
* Intel Starta flash gets detected - JFFS2 is not yet tested.
* platform_add_devices() is not working - Let me know, where I
am making mistake :)

Please review.
---

This patch adds minimal OMAP2430 support.
Based on 2.6.10 Linux kernel available on linux.omap.com from TI.

Signed-off-by: Komal Shah <komal_shah802003@yahoo.com>

--
http://www.fastmail.fm - A fast, anti-spam email service.