aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 13:59:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 13:59:31 -0400
commit72e58063d63c5f0a7bf65312f1e3a5ed9bb5c2ff (patch)
treedf5c21244d46aacef47e6b7fff3ad02c3612b15c /arch/arm/mach-omap2
parent57c155d51e2f3d7411eeac5e7fd7634d2d1f6b4f (diff)
parent489e176c71f36654dcb8835926f7e5717b8b4c19 (diff)
Merge branch 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci
* 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci: (50 commits) davinci: fix remaining board support after io_pgoffst removal davinci: mityomapl138: make file local data static arm/davinci: remove duplicated include davinci: Initial support for Omapl138-Hawkboard davinci: MityDSP-L138/MityARM-1808 read MAC address from I2C Prom davinci: add tnetv107x touchscreen platform device input: add driver for tnetv107x touchscreen controller davinci: add keypad config for tnetv107x evm board davinci: add tnetv107x keypad platform device input: add driver for tnetv107x on-chip keypad controller net: davinci_emac: cleanup unused cpdma code net: davinci_emac: switch to new cpdma layer net: davinci_emac: separate out cpdma code net: davinci_emac: cleanup unused mdio emac code omap: cleanup unused davinci mdio arch code davinci: cleanup mdio arch code and switch to phy_id net: davinci_emac: switch to new mdio omap: add mdio platform devices davinci: add mdio platform devices net: davinci_emac: separate out davinci mdio ... Fix up trivial conflict in drivers/input/keyboard/Kconfig (two entries added next to each other - one from the davinci merge, one from the input merge)
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index d547036aff3f..e1f8dda62799 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -18,6 +18,7 @@
18 18
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/clk.h>
21#include <linux/platform_device.h> 22#include <linux/platform_device.h>
22#include <linux/gpio.h> 23#include <linux/gpio.h>
23#include <linux/i2c/pca953x.h> 24#include <linux/i2c/pca953x.h>
@@ -38,19 +39,37 @@
38 39
39#include "mux.h" 40#include "mux.h"
40 41
41#define AM35XX_EVM_PHY_MASK (0xF)
42#define AM35XX_EVM_MDIO_FREQUENCY (1000000) 42#define AM35XX_EVM_MDIO_FREQUENCY (1000000)
43 43
44static struct mdio_platform_data am3517_evm_mdio_pdata = {
45 .bus_freq = AM35XX_EVM_MDIO_FREQUENCY,
46};
47
48static struct resource am3517_mdio_resources[] = {
49 {
50 .start = AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET,
51 .end = AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET +
52 SZ_4K - 1,
53 .flags = IORESOURCE_MEM,
54 },
55};
56
57static struct platform_device am3517_mdio_device = {
58 .name = "davinci_mdio",
59 .id = 0,
60 .num_resources = ARRAY_SIZE(am3517_mdio_resources),
61 .resource = am3517_mdio_resources,
62 .dev.platform_data = &am3517_evm_mdio_pdata,
63};
64
44static struct emac_platform_data am3517_evm_emac_pdata = { 65static struct emac_platform_data am3517_evm_emac_pdata = {
45 .phy_mask = AM35XX_EVM_PHY_MASK,
46 .mdio_max_freq = AM35XX_EVM_MDIO_FREQUENCY,
47 .rmii_en = 1, 66 .rmii_en = 1,
48}; 67};
49 68
50static struct resource am3517_emac_resources[] = { 69static struct resource am3517_emac_resources[] = {
51 { 70 {
52 .start = AM35XX_IPSS_EMAC_BASE, 71 .start = AM35XX_IPSS_EMAC_BASE,
53 .end = AM35XX_IPSS_EMAC_BASE + 0x3FFFF, 72 .end = AM35XX_IPSS_EMAC_BASE + 0x2FFFF,
54 .flags = IORESOURCE_MEM, 73 .flags = IORESOURCE_MEM,
55 }, 74 },
56 { 75 {
@@ -113,7 +132,6 @@ void am3517_evm_ethernet_init(struct emac_platform_data *pdata)
113 pdata->ctrl_reg_offset = AM35XX_EMAC_CNTRL_OFFSET; 132 pdata->ctrl_reg_offset = AM35XX_EMAC_CNTRL_OFFSET;
114 pdata->ctrl_mod_reg_offset = AM35XX_EMAC_CNTRL_MOD_OFFSET; 133 pdata->ctrl_mod_reg_offset = AM35XX_EMAC_CNTRL_MOD_OFFSET;
115 pdata->ctrl_ram_offset = AM35XX_EMAC_CNTRL_RAM_OFFSET; 134 pdata->ctrl_ram_offset = AM35XX_EMAC_CNTRL_RAM_OFFSET;
116 pdata->mdio_reg_offset = AM35XX_EMAC_MDIO_OFFSET;
117 pdata->ctrl_ram_size = AM35XX_EMAC_CNTRL_RAM_SIZE; 135 pdata->ctrl_ram_size = AM35XX_EMAC_CNTRL_RAM_SIZE;
118 pdata->version = EMAC_VERSION_2; 136 pdata->version = EMAC_VERSION_2;
119 pdata->hw_ram_addr = AM35XX_EMAC_HW_RAM_ADDR; 137 pdata->hw_ram_addr = AM35XX_EMAC_HW_RAM_ADDR;
@@ -121,6 +139,9 @@ void am3517_evm_ethernet_init(struct emac_platform_data *pdata)
121 pdata->interrupt_disable = am3517_disable_ethernet_int; 139 pdata->interrupt_disable = am3517_disable_ethernet_int;
122 am3517_emac_device.dev.platform_data = pdata; 140 am3517_emac_device.dev.platform_data = pdata;
123 platform_device_register(&am3517_emac_device); 141 platform_device_register(&am3517_emac_device);
142 platform_device_register(&am3517_mdio_device);
143 clk_add_alias(NULL, dev_name(&am3517_mdio_device.dev),
144 NULL, &am3517_emac_device.dev);
124 145
125 regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); 146 regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
126 regval = regval & (~(AM35XX_CPGMACSS_SW_RST)); 147 regval = regval & (~(AM35XX_CPGMACSS_SW_RST));