summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a6b5c5d)
raw | patch | inline | side by side (parent: a6b5c5d)
author | Mugunthan V N <mugunthanvnm@ti.com> | |
Mon, 8 Jul 2013 10:34:37 +0000 (16:04 +0530) | ||
committer | Somnath Mukherjee <somnath@ti.com> | |
Wed, 14 Aug 2013 16:01:44 +0000 (21:31 +0530) |
BD ram address may vary in various SOC, so removing the hardcoding and
passing the same information through platform data
Change-Id: Ib36d34f66f741321abdf06575010c87c99d49085
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
[Added change-id for gerrit]
Signed-off-by: Praveen Rao <prao@ti.com>
passing the same information through platform data
Change-Id: Ib36d34f66f741321abdf06575010c87c99d49085
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
[Added change-id for gerrit]
Signed-off-by: Praveen Rao <prao@ti.com>
board/ti/am335x/board.c | patch | blob | history | |
board/ti/ti814x/evm.c | patch | blob | history | |
drivers/net/cpsw.c | patch | blob | history | |
include/cpsw.h | patch | blob | history |
index b371376bc72c0f6d0b5c6118057065a6cd1679e4..d5163acb77b298324532b2cd4bb37c7a300d5863 100644 (file)
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
.ale_entries = 1024,
.host_port_reg_ofs = 0x108,
.hw_stats_reg_ofs = 0x900,
.ale_entries = 1024,
.host_port_reg_ofs = 0x108,
.hw_stats_reg_ofs = 0x900,
+ .bd_ram_ofs = 0x2000,
.mac_control = (1 << 5),
.control = cpsw_control,
.host_port_num = 0,
.mac_control = (1 << 5),
.control = cpsw_control,
.host_port_num = 0,
diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c
index 7adb52405c13ab41391b97ab5ce612bffe5b96c3..e51e59f541a7f9b91ceea1054a8550927984ca24 100644 (file)
--- a/board/ti/ti814x/evm.c
+++ b/board/ti/ti814x/evm.c
.ale_entries = 1024,
.host_port_reg_ofs = 0x28,
.hw_stats_reg_ofs = 0x400,
.ale_entries = 1024,
.host_port_reg_ofs = 0x28,
.hw_stats_reg_ofs = 0x400,
+ .bd_ram_ofs = 0x2000,
.mac_control = (1 << 5),
.control = cpsw_control,
.host_port_num = 0,
.mac_control = (1 << 5),
.control = cpsw_control,
.host_port_num = 0,
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index 379b679d2e47ba41bd229771aff20e801ec1a030..dc0a2be23bccf21cbd366861e774a68c33183817 100644 (file)
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
#define CPDMA_RXCP_VER1 0x160
#define CPDMA_RXCP_VER2 0x260
#define CPDMA_RXCP_VER1 0x160
#define CPDMA_RXCP_VER2 0x260
-#define CPDMA_RAM_ADDR 0x4a102000
-
/* Descriptor mode bits */
#define CPDMA_DESC_SOP BIT(31)
#define CPDMA_DESC_EOP BIT(30)
/* Descriptor mode bits */
#define CPDMA_DESC_SOP BIT(31)
#define CPDMA_DESC_EOP BIT(30)
return -ENOMEM;
}
return -ENOMEM;
}
- priv->descs = (void *)CPDMA_RAM_ADDR;
priv->host_port = data->host_port_num;
priv->regs = regs;
priv->host_port_regs = regs + data->host_port_reg_ofs;
priv->dma_regs = regs + data->cpdma_reg_ofs;
priv->ale_regs = regs + data->ale_reg_ofs;
priv->host_port = data->host_port_num;
priv->regs = regs;
priv->host_port_regs = regs + data->host_port_reg_ofs;
priv->dma_regs = regs + data->cpdma_reg_ofs;
priv->ale_regs = regs + data->ale_reg_ofs;
+ priv->descs = (void *)regs + data->bd_ram_ofs;
int idx = 0;
int idx = 0;
diff --git a/include/cpsw.h b/include/cpsw.h
index 296b0e557f3f58c41357d86235de2739cdcaebe9..743cb96e7e9e1502dfb807b1f8d9110b42605c98 100644 (file)
--- a/include/cpsw.h
+++ b/include/cpsw.h
int ale_entries; /* ale table size */
u32 host_port_reg_ofs; /* cpdma host port registers */
u32 hw_stats_reg_ofs; /* cpsw hw stats counters */
int ale_entries; /* ale table size */
u32 host_port_reg_ofs; /* cpdma host port registers */
u32 hw_stats_reg_ofs; /* cpsw hw stats counters */
+ u32 bd_ram_ofs; /* Buffer Descriptor RAM offset */
u32 mac_control;
struct cpsw_slave_data *slave_data;
void (*control)(int enabled);
u32 mac_control;
struct cpsw_slave_data *slave_data;
void (*control)(int enabled);