diff options
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r-- | arch/arm/mach-at91/at91_pmc_ll.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/bootstrap.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-at91/ddramc.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/at91_pmc_ll.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/at91_wdt.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-at91/sam9_smc.c | 6 |
6 files changed, 12 insertions, 13 deletions
diff --git a/arch/arm/mach-at91/at91_pmc_ll.c b/arch/arm/mach-at91/at91_pmc_ll.c index 9205322db9..e561f20755 100644 --- a/arch/arm/mach-at91/at91_pmc_ll.c +++ b/arch/arm/mach-at91/at91_pmc_ll.c @@ -88,6 +88,8 @@ void at91_pmc_init(void __iomem *pmc_base, unsigned int flags) tmp &= ~AT91_PMC_OSCBYPASS; tmp &= ~AT91_PMC_KEY_MASK; tmp |= AT91_PMC_KEY; + if (flags & AT91_PMC_LL_FLAG_MCK_BYPASS) + tmp |= AT91_PMC_OSCBYPASS; at91_pmc_write(AT91_CKGR_MOR, tmp); tmp = at91_pmc_read(AT91_CKGR_MOR); diff --git a/arch/arm/mach-at91/bootstrap.c b/arch/arm/mach-at91/bootstrap.c index 5d21b2d021..0b1567cd23 100644 --- a/arch/arm/mach-at91/bootstrap.c +++ b/arch/arm/mach-at91/bootstrap.c @@ -78,7 +78,7 @@ static void at91bootstrap_boot_nand(bool is_barebox) kernel_entry_func func = NULL; printf("Boot %s from nand\n", name); - func = bootstrap_read_devfs("nand0", true, SZ_128K, SZ_256K, SZ_1M); + func = bootstrap_read_devfs("nand0", true, SZ_128K, SZ_256K, SZ_1M, NULL); bootstrap_boot(func, is_barebox); bootstrap_err("... failed\n"); free(func); @@ -89,7 +89,7 @@ static void at91bootstrap_boot_mmc(void) kernel_entry_func func = NULL; printf("Boot from mmc\n"); - func = bootstrap_read_disk("disk0.0", NULL); + func = bootstrap_read_disk("disk0.0", NULL, NULL); bootstrap_boot(func, false); bootstrap_err("... failed\n"); free(func); diff --git a/arch/arm/mach-at91/ddramc.c b/arch/arm/mach-at91/ddramc.c index a241ea9f0a..c3ef6b0090 100644 --- a/arch/arm/mach-at91/ddramc.c +++ b/arch/arm/mach-at91/ddramc.c @@ -52,8 +52,4 @@ static struct driver_d sama5_ddr_driver = { .of_compatible = sama5_ddr_dt_ids, }; -static int sama5_ddr_init(void) -{ - return platform_driver_register(&sama5_ddr_driver); -} -mem_initcall(sama5_ddr_init); +mem_platform_driver(sama5_ddr_driver); diff --git a/arch/arm/mach-at91/include/mach/at91_pmc_ll.h b/arch/arm/mach-at91/include/mach/at91_pmc_ll.h index 6ec3ae0852..85896a01d5 100644 --- a/arch/arm/mach-at91/include/mach/at91_pmc_ll.h +++ b/arch/arm/mach-at91/include/mach/at91_pmc_ll.h @@ -16,6 +16,7 @@ #define AT91_PMC_LL_FLAG_H32MXDIV (1 << 3) #define AT91_PMC_LL_FLAG_PMC_UTMI (1 << 4) #define AT91_PMC_LL_FLAG_GCSR (1 << 5) +#define AT91_PMC_LL_FLAG_MCK_BYPASS (1 << 6) #define AT91_PMC_LL_AT91RM9200 (0) #define AT91_PMC_LL_AT91SAM9260 (0) @@ -30,6 +31,10 @@ #define AT91_PMC_LL_SAMA5D2 (AT91_PMC_LL_FLAG_SAM9X5_PMC | \ AT91_PMC_LL_FLAG_MEASURE_XTAL | \ AT91_PMC_LL_FLAG_PMC_UTMI) +/* This assumes a crystal on both XIN and XOUT. If your board + * instead has an extenal oscillator on XIN only, + * AT91_PMC_LL_FLAG_MCK_BYPASS needs to be OR`ed in as well + */ #define AT91_PMC_LL_SAMA5D3 (AT91_PMC_LL_FLAG_SAM9X5_PMC | \ AT91_PMC_LL_FLAG_DISABLE_RC | \ AT91_PMC_LL_FLAG_PMC_UTMI) diff --git a/arch/arm/mach-at91/include/mach/at91_wdt.h b/arch/arm/mach-at91/include/mach/at91_wdt.h index d295d35d1b..04924742a5 100644 --- a/arch/arm/mach-at91/include/mach/at91_wdt.h +++ b/arch/arm/mach-at91/include/mach/at91_wdt.h @@ -41,7 +41,7 @@ * Copyright (c) 2006, Atmel Corporation */ -#include <asm-generic/io.h> +#include <asm/io.h> static inline void at91_wdt_disable(void __iomem *wdt_base) { diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c index 05584c0711..813c2a0d94 100644 --- a/arch/arm/mach-at91/sam9_smc.c +++ b/arch/arm/mach-at91/sam9_smc.c @@ -200,8 +200,4 @@ static struct driver_d at91sam9_smc_driver = { .probe = at91sam9_smc_probe, }; -static int at91sam9_smc_init(void) -{ - return platform_driver_register(&at91sam9_smc_driver); -} -coredevice_initcall(at91sam9_smc_init); +coredevice_platform_driver(at91sam9_smc_driver); |