From d93d0f0cfef46293db97cbdc5e72c9e5bceadd02 Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Fri, 13 Aug 2010 16:07:35 +0900 Subject: S5P: Use accessor functions instead of SoC specific defines to access the base address This patch is intended to prepare the other S5P SoC. (s5pc210) If use SoC specific defines then can't share with other SoC. So, make the accessor functions for access the base address by common way. Signed-off-by: Minkyu Kang Signed-off-by: Kyungmin Park --- board/samsung/goni/lowlevel_init.S | 6 +++--- board/samsung/smdkc100/lowlevel_init.S | 2 +- board/samsung/smdkc100/onenand.c | 3 ++- board/samsung/smdkc100/smdkc100.c | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'board/samsung') diff --git a/board/samsung/goni/lowlevel_init.S b/board/samsung/goni/lowlevel_init.S index 4b72992..62737ab 100644 --- a/board/samsung/goni/lowlevel_init.S +++ b/board/samsung/goni/lowlevel_init.S @@ -51,7 +51,7 @@ lowlevel_init: ldr r7, =S5PC100_GPIO_BASE ldr r8, =S5PC100_GPIO_BASE /* Read CPU ID */ - ldr r2, =S5PC1XX_PRO_ID + ldr r2, =S5PC110_PRO_ID ldr r0, [r2] mov r1, #0x00010000 and r0, r0, r1 @@ -377,7 +377,7 @@ lockloop: * void system_clock_init(void) */ system_clock_init: - ldr r0, =S5PC1XX_CLOCK_BASE @ 0xE0100000 + ldr r0, =S5PC110_CLOCK_BASE @ 0xE0100000 /* Check S5PC100 */ cmp r7, r8 @@ -437,7 +437,7 @@ system_clock_init: ldr r1, =0x3ff03ff str r1, [r0, #0x114] @ S5PC110_CLAMP_STABLE - ldr r0, =S5PC1XX_CLOCK_BASE @ 0xE0100000 + ldr r0, =S5PC110_CLOCK_BASE @ 0xE0100000 /* Set Clock divider */ ldr r1, =0x14131330 @ 1:1:4:4, 1:4:5 diff --git a/board/samsung/smdkc100/lowlevel_init.S b/board/samsung/smdkc100/lowlevel_init.S index 32572c5..30d0d06 100644 --- a/board/samsung/smdkc100/lowlevel_init.S +++ b/board/samsung/smdkc100/lowlevel_init.S @@ -131,7 +131,7 @@ wakeup_reset: * void system_clock_init(void) */ system_clock_init: - ldr r8, =S5PC1XX_CLOCK_BASE @ 0xE0100000 + ldr r8, =S5PC100_CLOCK_BASE @ 0xE0100000 /* Set Clock divider */ ldr r1, =0x00011110 diff --git a/board/samsung/smdkc100/onenand.c b/board/samsung/smdkc100/onenand.c index c25869e..501855e 100644 --- a/board/samsung/smdkc100/onenand.c +++ b/board/samsung/smdkc100/onenand.c @@ -35,7 +35,8 @@ void onenand_board_init(struct mtd_info *mtd) { struct onenand_chip *this = mtd->priv; - struct s5pc100_clock *clk = (struct s5pc100_clock *)S5PC1XX_CLOCK_BASE; + struct s5pc100_clock *clk = + (struct s5pc100_clock *)samsung_get_base_clock(); struct samsung_onenand *onenand; int value; diff --git a/board/samsung/smdkc100/smdkc100.c b/board/samsung/smdkc100/smdkc100.c index fb466c6..bb72fd1 100644 --- a/board/samsung/smdkc100/smdkc100.c +++ b/board/samsung/smdkc100/smdkc100.c @@ -38,7 +38,7 @@ static void smc9115_pre_init(void) u32 smc_bw_conf, smc_bc_conf; struct s5pc100_gpio *const gpio = - (struct s5pc100_gpio *)S5PC100_GPIO_BASE; + (struct s5pc100_gpio *)samsung_get_base_gpio(); /* gpio configuration GPK0CON */ gpio_cfg_pin(&gpio->gpio_k0, CONFIG_ENV_SROM_BANK, GPIO_FUNC(2)); -- cgit v1.1 From a87bc64cb4311323f592265541ced6ec9171d4d6 Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Wed, 25 Aug 2010 13:45:43 +0900 Subject: ARMV7: S5P: rename the member of gpio structure Typically we declare the name of gpio structure to "gpio", so it was duplicated around the name. (e.g: gpio->gpio_a) This patch modified the naming that is removing "gpio_". Signed-off-by: Minkyu Kang Signed-off-by: Kyungmin Park --- board/samsung/goni/goni.c | 8 ++++---- board/samsung/smdkc100/smdkc100.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'board/samsung') diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c index 060d5d1..4336729 100644 --- a/board/samsung/goni/goni.c +++ b/board/samsung/goni/goni.c @@ -67,7 +67,7 @@ int board_mmc_init(bd_t *bis) int i; /* MASSMEMORY_EN: XMSMDATA7: GPJ2[7] output high */ - gpio_direction_output(&s5pc110_gpio->gpio_j2, 7, 1); + gpio_direction_output(&s5pc110_gpio->j2, 7, 1); /* * MMC0 GPIO @@ -80,11 +80,11 @@ int board_mmc_init(bd_t *bis) if (i == 2) continue; /* GPG0[0:6] special function 2 */ - gpio_cfg_pin(&s5pc110_gpio->gpio_g0, i, 0x2); + gpio_cfg_pin(&s5pc110_gpio->g0, i, 0x2); /* GPG0[0:6] pull disable */ - gpio_set_pull(&s5pc110_gpio->gpio_g0, i, GPIO_PULL_NONE); + gpio_set_pull(&s5pc110_gpio->g0, i, GPIO_PULL_NONE); /* GPG0[0:6] drv 4x */ - gpio_set_drv(&s5pc110_gpio->gpio_g0, i, GPIO_DRV_4X); + gpio_set_drv(&s5pc110_gpio->g0, i, GPIO_DRV_4X); } return s5p_mmc_init(0); diff --git a/board/samsung/smdkc100/smdkc100.c b/board/samsung/smdkc100/smdkc100.c index bb72fd1..31e8d9e 100644 --- a/board/samsung/smdkc100/smdkc100.c +++ b/board/samsung/smdkc100/smdkc100.c @@ -41,7 +41,7 @@ static void smc9115_pre_init(void) (struct s5pc100_gpio *)samsung_get_base_gpio(); /* gpio configuration GPK0CON */ - gpio_cfg_pin(&gpio->gpio_k0, CONFIG_ENV_SROM_BANK, GPIO_FUNC(2)); + gpio_cfg_pin(&gpio->k0, CONFIG_ENV_SROM_BANK, GPIO_FUNC(2)); /* Ethernet needs bus width of 16 bits */ smc_bw_conf = SMC_DATA16_WIDTH(CONFIG_ENV_SROM_BANK); -- cgit v1.1