mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
ARM: at91: make smc register base soc independent
now sam9_smc_configure will take as first parameter is the SMC id Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "soc.h"
|
||||
#include "generic.h"
|
||||
#include "clock.h"
|
||||
#include "sam9_smc.h"
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Clocks
|
||||
@@ -336,6 +337,7 @@ static void __init at91cap9_map_io(void)
|
||||
static void __init at91cap9_ioremap_registers(void)
|
||||
{
|
||||
at91sam926x_ioremap_pit(AT91CAP9_BASE_PIT);
|
||||
at91sam9_ioremap_smc(0, AT91CAP9_BASE_SMC);
|
||||
}
|
||||
|
||||
static void __init at91cap9_initialize(void)
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "soc.h"
|
||||
#include "generic.h"
|
||||
#include "clock.h"
|
||||
#include "sam9_smc.h"
|
||||
|
||||
static struct map_desc at91rm9200_io_desc[] __initdata = {
|
||||
{
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "soc.h"
|
||||
#include "generic.h"
|
||||
#include "clock.h"
|
||||
#include "sam9_smc.h"
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Clocks
|
||||
@@ -328,6 +329,7 @@ static void __init at91sam9260_map_io(void)
|
||||
static void __init at91sam9260_ioremap_registers(void)
|
||||
{
|
||||
at91sam926x_ioremap_pit(AT91SAM9260_BASE_PIT);
|
||||
at91sam9_ioremap_smc(0, AT91SAM9260_BASE_SMC);
|
||||
}
|
||||
|
||||
static void __init at91sam9260_initialize(void)
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "soc.h"
|
||||
#include "generic.h"
|
||||
#include "clock.h"
|
||||
#include "sam9_smc.h"
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Clocks
|
||||
@@ -288,6 +289,7 @@ static void __init at91sam9261_map_io(void)
|
||||
static void __init at91sam9261_ioremap_registers(void)
|
||||
{
|
||||
at91sam926x_ioremap_pit(AT91SAM9261_BASE_PIT);
|
||||
at91sam9_ioremap_smc(0, AT91SAM9261_BASE_SMC);
|
||||
}
|
||||
|
||||
static void __init at91sam9261_initialize(void)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "soc.h"
|
||||
#include "generic.h"
|
||||
#include "clock.h"
|
||||
#include "sam9_smc.h"
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Clocks
|
||||
@@ -306,6 +307,8 @@ static void __init at91sam9263_map_io(void)
|
||||
static void __init at91sam9263_ioremap_registers(void)
|
||||
{
|
||||
at91sam926x_ioremap_pit(AT91SAM9263_BASE_PIT);
|
||||
at91sam9_ioremap_smc(0, AT91SAM9263_BASE_SMC0);
|
||||
at91sam9_ioremap_smc(1, AT91SAM9263_BASE_SMC1);
|
||||
}
|
||||
|
||||
static void __init at91sam9263_initialize(void)
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "soc.h"
|
||||
#include "generic.h"
|
||||
#include "clock.h"
|
||||
#include "sam9_smc.h"
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Clocks
|
||||
@@ -341,6 +342,7 @@ static void __init at91sam9g45_map_io(void)
|
||||
static void __init at91sam9g45_ioremap_registers(void)
|
||||
{
|
||||
at91sam926x_ioremap_pit(AT91SAM9G45_BASE_PIT);
|
||||
at91sam9_ioremap_smc(0, AT91SAM9G45_BASE_SMC);
|
||||
}
|
||||
|
||||
static void __init at91sam9g45_initialize(void)
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "soc.h"
|
||||
#include "generic.h"
|
||||
#include "clock.h"
|
||||
#include "sam9_smc.h"
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
* Clocks
|
||||
@@ -293,6 +294,7 @@ static void __init at91sam9rl_map_io(void)
|
||||
static void __init at91sam9rl_ioremap_registers(void)
|
||||
{
|
||||
at91sam926x_ioremap_pit(AT91SAM9RL_BASE_PIT);
|
||||
at91sam9_ioremap_smc(0, AT91SAM9RL_BASE_SMC);
|
||||
}
|
||||
|
||||
static void __init at91sam9rl_initialize(void)
|
||||
|
||||
@@ -163,7 +163,7 @@ static struct sam9_smc_config __initdata cam60_nand_smc_config = {
|
||||
static void __init cam60_add_device_nand(void)
|
||||
{
|
||||
/* configure chip-select 3 (NAND) */
|
||||
sam9_smc_configure(3, &cam60_nand_smc_config);
|
||||
sam9_smc_configure(0, 3, &cam60_nand_smc_config);
|
||||
|
||||
at91_add_device_nand(&cam60_nand_data);
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ static void __init cap9adk_add_device_nand(void)
|
||||
cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_8;
|
||||
|
||||
/* configure chip-select 3 (NAND) */
|
||||
sam9_smc_configure(3, &cap9adk_nand_smc_config);
|
||||
sam9_smc_configure(0, 3, &cap9adk_nand_smc_config);
|
||||
|
||||
at91_add_device_nand(&cap9adk_nand_data);
|
||||
}
|
||||
@@ -282,7 +282,7 @@ static __init void cap9adk_add_device_nor(void)
|
||||
at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V);
|
||||
|
||||
/* configure chip-select 0 (NOR) */
|
||||
sam9_smc_configure(0, &cap9adk_nor_smc_config);
|
||||
sam9_smc_configure(0, 0, &cap9adk_nor_smc_config);
|
||||
|
||||
platform_device_register(&cap9adk_nor_flash);
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ static struct sam9_smc_config __initdata cpu9krea_nand_smc_config = {
|
||||
|
||||
static void __init cpu9krea_add_device_nand(void)
|
||||
{
|
||||
sam9_smc_configure(3, &cpu9krea_nand_smc_config);
|
||||
sam9_smc_configure(0, 3, &cpu9krea_nand_smc_config);
|
||||
at91_add_device_nand(&cpu9krea_nand_data);
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ static __init void cpu9krea_add_device_nor(void)
|
||||
at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_VDDIOMSEL_3_3V);
|
||||
|
||||
/* configure chip-select 0 (NOR) */
|
||||
sam9_smc_configure(0, &cpu9krea_nor_smc_config);
|
||||
sam9_smc_configure(0, 0, &cpu9krea_nor_smc_config);
|
||||
|
||||
platform_device_register(&cpu9krea_nor_flash);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ static void __init ek_add_device_nand(void)
|
||||
ek_nand_smc_config.mode |= AT91_SMC_DBW_8;
|
||||
|
||||
/* configure chip-select 3 (NAND) */
|
||||
sam9_smc_configure(3, &ek_nand_smc_config);
|
||||
sam9_smc_configure(0, 3, &ek_nand_smc_config);
|
||||
|
||||
at91_add_device_nand(&ek_nand_data);
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@ static struct sam9_smc_config __initdata neocore926_nand_smc_config = {
|
||||
static void __init neocore926_add_device_nand(void)
|
||||
{
|
||||
/* configure chip-select 3 (NAND) */
|
||||
sam9_smc_configure(3, &neocore926_nand_smc_config);
|
||||
sam9_smc_configure(0, 3, &neocore926_nand_smc_config);
|
||||
|
||||
at91_add_device_nand(&neocore926_nand_data);
|
||||
}
|
||||
|
||||
@@ -96,9 +96,9 @@ static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { {
|
||||
static void __init add_device_pcontrol(void)
|
||||
{
|
||||
/* configure chip-select 4 (IO compatible to 8051 X4 ) */
|
||||
sam9_smc_configure(4, &pcontrol_smc_config[0]);
|
||||
sam9_smc_configure(0, 4, &pcontrol_smc_config[0]);
|
||||
/* configure chip-select 7 (FerroRAM 256KiBx16bit MR2A16A D4 ) */
|
||||
sam9_smc_configure(7, &pcontrol_smc_config[1]);
|
||||
sam9_smc_configure(0, 7, &pcontrol_smc_config[1]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -161,7 +161,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
|
||||
static void __init ek_add_device_nand(void)
|
||||
{
|
||||
/* configure chip-select 3 (NAND) */
|
||||
sam9_smc_configure(3, &ek_nand_smc_config);
|
||||
sam9_smc_configure(0, 3, &ek_nand_smc_config);
|
||||
|
||||
at91_add_device_nand(&ek_nand_data);
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ static struct sam9_smc_config __initdata ek_nand_smc_config = {
|
||||
static void __init ek_add_device_nand(void)
|
||||
{
|
||||
/* configure chip-select 3 (NAND) */
|
||||
sam9_smc_configure(3, &ek_nand_smc_config);
|
||||
sam9_smc_configure(0, 3, &ek_nand_smc_config);
|
||||
|
||||
at91_add_device_nand(&ek_nand_data);
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ static void __init ek_add_device_nand(void)
|
||||
ek_nand_smc_config.mode |= AT91_SMC_DBW_8;
|
||||
|
||||
/* configure chip-select 3 (NAND) */
|
||||
sam9_smc_configure(3, &ek_nand_smc_config);
|
||||
sam9_smc_configure(0, 3, &ek_nand_smc_config);
|
||||
|
||||
at91_add_device_nand(&ek_nand_data);
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ static struct sam9_smc_config __initdata dm9000_smc_config = {
|
||||
static void __init ek_add_device_dm9000(void)
|
||||
{
|
||||
/* Configure chip-select 2 (DM9000) */
|
||||
sam9_smc_configure(2, &dm9000_smc_config);
|
||||
sam9_smc_configure(0, 2, &dm9000_smc_config);
|
||||
|
||||
/* Configure Reset signal as output */
|
||||
at91_set_gpio_output(AT91_PIN_PC10, 0);
|
||||
@@ -217,7 +217,7 @@ static void __init ek_add_device_nand(void)
|
||||
ek_nand_smc_config.mode |= AT91_SMC_DBW_8;
|
||||
|
||||
/* configure chip-select 3 (NAND) */
|
||||
sam9_smc_configure(3, &ek_nand_smc_config);
|
||||
sam9_smc_configure(0, 3, &ek_nand_smc_config);
|
||||
|
||||
at91_add_device_nand(&ek_nand_data);
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ static void __init ek_add_device_nand(void)
|
||||
ek_nand_smc_config.mode |= AT91_SMC_DBW_8;
|
||||
|
||||
/* configure chip-select 3 (NAND) */
|
||||
sam9_smc_configure(3, &ek_nand_smc_config);
|
||||
sam9_smc_configure(0, 3, &ek_nand_smc_config);
|
||||
|
||||
at91_add_device_nand(&ek_nand_data);
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ static void __init ek_add_device_nand(void)
|
||||
ek_nand_smc_config.mode |= AT91_SMC_DBW_8;
|
||||
|
||||
/* configure chip-select 3 (NAND) */
|
||||
sam9_smc_configure(3, &ek_nand_smc_config);
|
||||
sam9_smc_configure(0, 3, &ek_nand_smc_config);
|
||||
|
||||
at91_add_device_nand(&ek_nand_data);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ static void __init ek_add_device_nand(void)
|
||||
ek_nand_smc_config.mode |= AT91_SMC_DBW_8;
|
||||
|
||||
/* configure chip-select 3 (NAND) */
|
||||
sam9_smc_configure(3, &ek_nand_smc_config);
|
||||
sam9_smc_configure(0, 3, &ek_nand_smc_config);
|
||||
|
||||
at91_add_device_nand(&ek_nand_data);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user