ARM: S5P: Add SROMC support and DM9000 Ethernet controller support on SMDKV210
Subsystems (3)
cover ARM: S5P: Add SROMC support and DM9000 Ethernet controller support on SMDKV210
This patch moves regarding SROMC support code to plat-s5p for common usage of S5P SoCs. And adds support DM9000 Ethernet Controller for SMDKV210 board.
[PATCH 1/6] ARM: S5P: Move the SROM register definitions to plat-s5p [PATCH 2/6] ARM: S5P: Add SROM control register shift macros for other banks. [PATCH 3/6] ARM: S5P: Add SROM bank 4 and 5 register offsets [PATCH 4/6] ARM: S5P: Move SROM controller IO mapping to plat-s5p for S5P SoCs [PATCH 5/6] ARM: S5PV210: Add SROM controller clock
[PATCH 6/6] ARM: S5PV210: Add DM9000 support on SMDKV210
PATCH 1/6 ARM: S5P: Move the SROM register definitions to plat-s5p
The SROM register difinitions of S5PV310/S5PC210 (mach/regs-srom.h) can be used to other S5P SoCs such as S5PV210/S5PC110. So moved into plat/regs-srom.h of plat-s5p directory.
--- arch/arm/mach-s5pv310/include/mach/regs-srom.h | 50 ------------------------ arch/arm/mach-s5pv310/mach-smdkc210.c | 31 +++++++-------- arch/arm/mach-s5pv310/mach-smdkv310.c | 31 +++++++-------- arch/arm/plat-s5p/include/plat/regs-srom.h | 50 ++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 82 deletions(-) delete mode 100644 arch/arm/mach-s5pv310/include/mach/regs-srom.h create mode 100644 arch/arm/plat-s5p/include/plat/regs-srom.h
arch/arm/mach-s5pv310/include/mach/regs-srom.h deleted +0 -50
@@ -1,50 +0,0 @@ -/* linux/arch/arm/mach-s5pv310/include/mach/regs-srom.h -* -* Copyright (c) 2010 Samsung Electronics Co., Ltd. -* http://www.samsung.com -* -* S5PV310 - SROMC register definitions -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifndef __ASM_ARCH_REGS_SROM_H -#define __ASM_ARCH_REGS_SROM_H __FILE__ - -#include <mach/map.h> - -#define S5PV310_SROMREG (x) (S5P_VA_SROMC + (x)) - -#define S5PV310_SROM_BW S5PV310_SROMREG(0x0) -#define S5PV310_SROM_BC0 S5PV310_SROMREG(0x4) -#define S5PV310_SROM_BC1 S5PV310_SROMREG(0x8) -#define S5PV310_SROM_BC2 S5PV310_SROMREG(0xc) -#define S5PV310_SROM_BC3 S5PV310_SROMREG(0x10) - -/* one register BW holds 4 x 4-bit packed settings for NCS0 - NCS3 */ - -#define S5PV310_SROM_BW__DATAWIDTH__SHIFT 0 -#define S5PV310_SROM_BW__ADDRMODE__SHIFT 1 -#define S5PV310_SROM_BW__WAITENABLE__SHIFT 2 -#define S5PV310_SROM_BW__BYTEENABLE__SHIFT 3 - -#define S5PV310_SROM_BW__CS_MASK 0xf - -#define S5PV310_SROM_BW__NCS0__SHIFT 0 -#define S5PV310_SROM_BW__NCS1__SHIFT 4 -#define S5PV310_SROM_BW__NCS2__SHIFT 8 -#define S5PV310_SROM_BW__NCS3__SHIFT 12 - -/* applies to same to BCS0 - BCS3 */ - -#define S5PV310_SROM_BCX__PMC__SHIFT 0 -#define S5PV310_SROM_BCX__TACP__SHIFT 4 -#define S5PV310_SROM_BCX__TCAH__SHIFT 8 -#define S5PV310_SROM_BCX__TCOH__SHIFT 12 -#define S5PV310_SROM_BCX__TACC__SHIFT 16 -#define S5PV310_SROM_BCX__TCOS__SHIFT 24 -#define S5PV310_SROM_BCX__TACS__SHIFT 28 - -#endif /* __ASM_ARCH_REGS_SROM_H */
arch/arm/mach-s5pv310/mach-smdkc210.c +15 -16
@@ -19,13 +19,13 @@#include <asm/mach-types.h> #include <plat/regs-serial.h> +#include <plat/regs-srom.h> #include <plat/s5pv310.h> #include <plat/cpu.h> #include <plat/devs.h> #include <plat/sdhci.h> #include <mach/map.h> -#include <mach/regs-srom.h> /* Following are default values for UCON, ULCON and UFCON UART registers */ #define SMDKC210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -154,23 +154,22 @@ static void __init smdkc210_smsc911x_init(void)u32 cs1;/* configure nCS1 width to 16 bits */ - cs1 =__raw_readl (S5PV310_SROM_BW ) & - ~(S5PV310_SROM_BW__CS_MASK << -S5PV310_SROM_BW__NCS1__SHIFT ); - cs1 |= ((1 <<S5PV310_SROM_BW__DATAWIDTH__SHIFT ) | - (1 <<S5PV310_SROM_BW__WAITENABLE__SHIFT ) | - (1 <<S5PV310_SROM_BW__BYTEENABLE__SHIFT )) << -S5PV310_SROM_BW__NCS1__SHIFT ; -__raw_writel (cs1,S5PV310_SROM_BW ); + cs1 =__raw_readl (S5P_SROM_BW ) & + ~(S5P_SROM_BW__CS_MASK <<S5P_SROM_BW__NCS1__SHIFT ); + cs1 |= ((1 <<S5P_SROM_BW__DATAWIDTH__SHIFT ) | + (1 <<S5P_SROM_BW__WAITENABLE__SHIFT ) | + (1 <<S5P_SROM_BW__BYTEENABLE__SHIFT )) << +S5P_SROM_BW__NCS1__SHIFT ; +__raw_writel (cs1,S5P_SROM_BW );/* set timing for nCS1 suitable for ethernet chip */ -__raw_writel ((0x1 <<S5PV310_SROM_BCX__PMC__SHIFT ) | - (0x9 <<S5PV310_SROM_BCX__TACP__SHIFT ) | - (0xc <<S5PV310_SROM_BCX__TCAH__SHIFT ) | - (0x1 <<S5PV310_SROM_BCX__TCOH__SHIFT ) | - (0x6 <<S5PV310_SROM_BCX__TACC__SHIFT ) | - (0x1 <<S5PV310_SROM_BCX__TCOS__SHIFT ) | - (0x1 <<S5PV310_SROM_BCX__TACS__SHIFT ),S5PV310_SROM_BC1 ); +__raw_writel ((0x1 <<S5P_SROM_BCX__PMC__SHIFT ) | + (0x9 <<S5P_SROM_BCX__TACP__SHIFT ) | + (0xc <<S5P_SROM_BCX__TCAH__SHIFT ) | + (0x1 <<S5P_SROM_BCX__TCOH__SHIFT ) | + (0x6 <<S5P_SROM_BCX__TACC__SHIFT ) | + (0x1 <<S5P_SROM_BCX__TCOS__SHIFT ) | + (0x1 <<S5P_SROM_BCX__TACS__SHIFT ),S5P_SROM_BC1 ); }static void __init smdkc210_map_io (void )
arch/arm/mach-s5pv310/mach-smdkv310.c +15 -16
@@ -19,13 +19,13 @@#include <asm/mach-types.h> #include <plat/regs-serial.h> +#include <plat/regs-srom.h> #include <plat/s5pv310.h> #include <plat/cpu.h> #include <plat/devs.h> #include <plat/sdhci.h> #include <mach/map.h> -#include <mach/regs-srom.h> /* Following are default values for UCON, ULCON and UFCON UART registers */ #define SMDKV310_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -154,23 +154,22 @@ static void __init smdkv310_smsc911x_init(void)u32 cs1;/* configure nCS1 width to 16 bits */ - cs1 =__raw_readl (S5PV310_SROM_BW ) & - ~(S5PV310_SROM_BW__CS_MASK << -S5PV310_SROM_BW__NCS1__SHIFT ); - cs1 |= ((1 <<S5PV310_SROM_BW__DATAWIDTH__SHIFT ) | - (1 <<S5PV310_SROM_BW__WAITENABLE__SHIFT ) | - (1 <<S5PV310_SROM_BW__BYTEENABLE__SHIFT )) << -S5PV310_SROM_BW__NCS1__SHIFT ; -__raw_writel (cs1,S5PV310_SROM_BW ); + cs1 =__raw_readl (S5P_SROM_BW ) & + ~(S5P_SROM_BW__CS_MASK <<S5P_SROM_BW__NCS1__SHIFT ); + cs1 |= ((1 <<S5P_SROM_BW__DATAWIDTH__SHIFT ) | + (1 <<S5P_SROM_BW__WAITENABLE__SHIFT ) | + (1 <<S5P_SROM_BW__BYTEENABLE__SHIFT )) << +S5P_SROM_BW__NCS1__SHIFT ; +__raw_writel (cs1,S5P_SROM_BW );/* set timing for nCS1 suitable for ethernet chip */ -__raw_writel ((0x1 <<S5PV310_SROM_BCX__PMC__SHIFT ) | - (0x9 <<S5PV310_SROM_BCX__TACP__SHIFT ) | - (0xc <<S5PV310_SROM_BCX__TCAH__SHIFT ) | - (0x1 <<S5PV310_SROM_BCX__TCOH__SHIFT ) | - (0x6 <<S5PV310_SROM_BCX__TACC__SHIFT ) | - (0x1 <<S5PV310_SROM_BCX__TCOS__SHIFT ) | - (0x1 <<S5PV310_SROM_BCX__TACS__SHIFT ),S5PV310_SROM_BC1 ); +__raw_writel ((0x1 <<S5P_SROM_BCX__PMC__SHIFT ) | + (0x9 <<S5P_SROM_BCX__TACP__SHIFT ) | + (0xc <<S5P_SROM_BCX__TCAH__SHIFT ) | + (0x1 <<S5P_SROM_BCX__TCOH__SHIFT ) | + (0x6 <<S5P_SROM_BCX__TACC__SHIFT ) | + (0x1 <<S5P_SROM_BCX__TCOS__SHIFT ) | + (0x1 <<S5P_SROM_BCX__TACS__SHIFT ),S5P_SROM_BC1 ); }static void __init smdkv310_map_io (void )
arch/arm/plat-s5p/include/plat/regs-srom.h new file +50 -0
50 lines not on this page · raw message
Signature · 1 line
1.6.2.5
PATCH 2/6 ARM: S5P: Add SROM control register shift macros for other banks.
In reply to Kukjin KimFrom: Thomas Abraham <[email protected]>
This patch adds shift macros for the SROM Bus width and control register to represent the shift count for the 5th and 6th SROM banks. Some of the S5P SOCs have them.
--- arch/arm/plat-s5p/include/plat/regs-srom.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-s5p/include/plat/regs-srom.h +2 -0
@@ -36,6 +36,8 @@#define S5P_SROM_BW__NCS1__SHIFT 4#define S5P_SROM_BW__NCS2__SHIFT 8#define S5P_SROM_BW__NCS3__SHIFT 12 +#define S5P_SROM_BW__NCS4__SHIFT 16 +#define S5P_SROM_BW__NCS5__SHIFT 20/* applies to same to BCS0 - BCS3 */
Signature · 1 line
1.6.2.5
PATCH 3/6 ARM: S5P: Add SROM bank 4 and 5 register offsets
In reply to Kukjin KimFrom: Thomas Abraham <[email protected]>
Some of the S5P platforms like S5PC100 and S5PV210 include SROM banks 4 and 5 in addition to SROM banks 0 to 3. This patch adds register offsets for SROM bank 4 and 5.
--- arch/arm/plat-s5p/include/plat/regs-srom.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-s5p/include/plat/regs-srom.h +2 -0
@@ -22,6 +22,8 @@#define S5P_SROM_BC1 S5P_SROMREG(0x8)#define S5P_SROM_BC2 S5P_SROMREG(0xc)#define S5P_SROM_BC3 S5P_SROMREG(0x10) +#define S5P_SROM_BC4 S5P_SROMREG(0x14) +#define S5P_SROM_BC5 S5P_SROMREG(0x18)/* one register BW holds 4 x 4-bit packed settings for NCS0 - NCS3 */
Signature · 1 line
1.6.2.5
PATCH 4/6 ARM: S5P: Move SROM controller IO mapping to plat-s5p for S5P SoCs
In reply to Kukjin KimFrom: Thomas Abraham <[email protected]>
This patch modifies the following.
1. Moves the SROM controller mapping from S5PV210 specific code to S5P common code. The SROM controller mapping can be used for all S5P SoCs.
2. Define the SROM controller physical address for S5P64X0, S5P6442, S5PC100, S5PV210 and S5PV310.
--- arch/arm/mach-s5p6442/include/mach/map.h | 3 +++ arch/arm/mach-s5p64x0/include/mach/map.h | 3 +++ arch/arm/mach-s5pc100/include/mach/map.h | 2 ++ arch/arm/mach-s5pv210/cpu.c | 5 ----- arch/arm/mach-s5pv210/include/mach/map.h | 1 + arch/arm/mach-s5pv310/include/mach/map.h | 1 + arch/arm/plat-s5p/cpu.c | 5 +++++ 7 files changed, 15 insertions(+), 5 deletions(-)
arch/arm/mach-s5p6442/include/mach/map.h +3 -0
@@ -28,6 +28,9 @@#define S5P6442_PA_VIC1 (0xE4100000)#define S5P6442_PA_VIC2 (0xE4200000) +#define S5P6442_PA_SROMC (0xE7000000) +#define S5P_PA_SROMC S5P6442_PA_SROMC +#define S5P6442_PA_MDMA 0xE8000000#define S5P6442_PA_PDMA 0xE9000000
arch/arm/mach-s5p64x0/include/mach/map.h +3 -0
@@ -29,6 +29,9 @@#define S5P64X0_PA_VIC0 (0xE4000000)#define S5P64X0_PA_VIC1 (0xE4100000) +#define S5P64X0_PA_SROMC (0xE7000000) +#define S5P_PA_SROMC S5P64X0_PA_SROMC +#define S5P64X0_PA_PDMA (0xE9000000)#define S5P64X0_PA_TIMER (0xEA000000)
arch/arm/mach-s5pc100/include/mach/map.h +2 -0
@@ -55,6 +55,8 @@#define S5PC100_VA_VIC_OFFSET 0x10000#define S5PC1XX_VA_VIC (x) (S5PC100_VA_VIC + ((x) * S5PC100_VA_VIC_OFFSET)) +#define S5PC100_PA_SROMC (0xE7000000) +#define S5P_PA_SROMC S5PC100_PA_SROMC#define S5PC100_PA_ONENAND (0xE7100000)
arch/arm/mach-s5pv210/cpu.c +0 -5
@@ -81,11 +81,6 @@ static struct map_desc s5pv210_iodesc[] __initdata = { .length = SZ_512K, .type = MT_DEVICE, }, { - .virtual = (unsigned long)S5P_VA_SROMC, - .pfn = __phys_to_pfn(S5PV210_PA_SROMC), - .length = SZ_4K, - .type = MT_DEVICE, - }, { .virtual = (unsigned long)S5P_VA_DMC0, .pfn = __phys_to_pfn(S5PV210_PA_DMC0), .length = SZ_4K,
arch/arm/mach-s5pv210/include/mach/map.h +1 -0
@@ -60,6 +60,7 @@#define S3C_VA_UARTx (x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET))#define S5PV210_PA_SROMC (0xE8000000) +#define S5P_PA_SROMC S5PV210_PA_SROMC#define S5PV210_PA_CFCON (0xE8200000)
arch/arm/mach-s5pv310/include/mach/map.h +1 -0
@@ -59,6 +59,7 @@#define S5PV310_PA_HSMMC (x) (0x12510000 + ((x) * 0x10000))#define S5PV310_PA_SROMC (0x12570000) +#define S5P_PA_SROMC S5PV310_PA_SROMC#define S5PV310_PA_UART (0x13800000)
arch/arm/plat-s5p/cpu.c +5 -0
@@ -108,6 +108,11 @@ static struct map_desc s5p_iodesc[] __initdata = { .pfn = __phys_to_pfn(S3C_PA_WDT), .length = SZ_4K, .type = MT_DEVICE, + }, { + .virtual = (unsigned long)S5P_VA_SROMC, + .pfn = __phys_to_pfn(S5P_PA_SROMC), + .length = SZ_4K, + .type = MT_DEVICE, }, };
Signature · 1 line
1.6.2.5
PATCH 5/6 ARM: S5PV210: Add SROM controller clock
In reply to Kukjin KimFrom: Thomas Abraham <[email protected]>
This patch adds the SROM controller clock to the list of clocks to be enabled at boot time. It is required to be enabled at boot time since the modules connected over the SROM interface such as the Ethernet controller need an operational SROM.
--- arch/arm/mach-s5pv210/clock.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/clock.c +6 -0
@@ -525,6 +525,12 @@ static struct clk init_clocks[] = { .parent = &clk_pclk_psys.clk, .enable = s5pv210_clk_ip3_ctrl, .ctrlbit = (1 << 20), + }, { + .name = "sromc", + .id = -1, + .parent = &clk_hclk_psys.clk, + .enable = s5pv210_clk_ip1_ctrl, + .ctrlbit = (1 << 26), }, };
Signature · 1 line
1.6.2.5
PATCH 6/6 ARM: S5PV210: Add DM9000 support on SMDKV210
In reply to Kukjin KimFrom: Thomas Abraham <[email protected]>
This patch adds DM9000 Ethernet Controller device support for SMDKV210.
--- arch/arm/mach-s5pv210/include/mach/map.h | 2 + arch/arm/mach-s5pv210/mach-smdkv210.c | 57 ++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 0 deletions(-)
arch/arm/mach-s5pv210/include/mach/map.h +2 -0
@@ -16,6 +16,8 @@#include <plat/map-base.h> #include <plat/map-s5p.h> +#define S5PV210_PA_SROM_BANK5 (0xA8000000) +#define S5PC110_PA_ONENAND (0xB0000000)#define S5P_PA_ONENAND S5PC110_PA_ONENAND
arch/arm/mach-s5pv210/mach-smdkv210.c +57 -0
89 lines not on this page · raw message
Signature · 1 line
1.6.2.5