Skip to content

Commit

Permalink
Merge tag 'at91-soc4' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/nferre/linux-at91 into next/soc

Merge "at91: cleanup/soc for 3.20 #4" from Nicolas Ferre:

Fourth cleanup/soc batch for 3.20:
- merge all the at91sam9 code and remove the empty SoC-specific files
- remove the at91_boot_soc that is now useless in a DT context
- move the sram code in PM code as it's now only used there
- some file + function name changes after this big cleanup

* tag 'at91-soc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91:
  ARM: at91/trivial: unify functions and machine names
  ARM: at91: remove at91_dt_initialize and machine init_early()
  ARM: at91: change board files into SoC files
  ARM: at91: remove at91_boot_soc
  ARM: at91: move alternative initial mapping to board-dt-sama5.c
  ARM: at91: merge all SOC_AT91SAM9xxx
  ARM: at91: at91rm9200: set idle and restart from rm9200_dt_device_init()
  ARM: at91: board-dt-sama5: add phy_fixup to override NAND_Tree
  ARM: at91/dt: sam9263: Add missing clocks to lcdc node
  ARM: at91: sama5d3: dt: correct the sound route
  ARM: at91/dt: sama5d4: fix the timer reg length

Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Olof Johansson committed Feb 6, 2015
2 parents ee481c8 + ad3fc3e commit df1a668
Show file tree
Hide file tree
Showing 25 changed files with 268 additions and 706 deletions.
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/at91sam9263.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,8 @@
interrupts = <26 IRQ_TYPE_LEVEL_HIGH 3>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fb>;
clocks = <&lcd_clk>, <&lcd_clk>;
clock-names = "lcdc_clk", "hclk";
status = "disabled";
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/sama5d3xmb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
"Headphone Jack", "HPOUTR",
"IN2L", "Line In Jack",
"IN2R", "Line In Jack",
"MICBIAS", "IN1L",
"Mic", "MICBIAS",
"IN1L", "Mic";

atmel,ssc-controller = <&ssc0>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/sama5d4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@

pit: timer@fc068630 {
compatible = "atmel,at91sam9260-pit";
reg = <0xfc068630 0xf>;
reg = <0xfc068630 0x10>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH 5>;
clocks = <&h32ck>;
};
Expand Down
10 changes: 1 addition & 9 deletions arch/arm/configs/at91_dt_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,7 @@ CONFIG_MODULE_UNLOAD=y
# CONFIG_IOSCHED_CFQ is not set
CONFIG_ARCH_AT91=y
CONFIG_SOC_AT91RM9200=y
CONFIG_SOC_AT91SAM9260=y
CONFIG_SOC_AT91SAM9261=y
CONFIG_SOC_AT91SAM9263=y
CONFIG_SOC_AT91SAM9RL=y
CONFIG_SOC_AT91SAM9G45=y
CONFIG_SOC_AT91SAM9X5=y
CONFIG_SOC_AT91SAM9N12=y
CONFIG_MACH_AT91RM9200_DT=y
CONFIG_MACH_AT91SAM9_DT=y
CONFIG_SOC_AT91SAM9=y
CONFIG_AT91_TIMER_HZ=128
CONFIG_AEABI=y
CONFIG_UACCESS_WITH_MEMCPY=y
Expand Down
92 changes: 26 additions & 66 deletions arch/arm/mach-at91/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ config HAVE_AT91_SMD
config HAVE_AT91_H32MX
bool

config SOC_AT91SAM9
bool
select ATMEL_AIC_IRQ
select COMMON_CLK_AT91
select CPU_ARM926T
select GENERIC_CLOCKEVENTS
select MEMORY
select ATMEL_SDRAMC

config SOC_SAMA5
bool
select ATMEL_AIC5_IRQ
Expand Down Expand Up @@ -92,67 +83,36 @@ config SOC_AT91RM9200
select GENERIC_CLOCKEVENTS
select HAVE_AT91_USB_CLK

config SOC_AT91SAM9260
bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20"
select SOC_AT91SAM9
select HAVE_AT91_USB_CLK
help
Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE
or AT91SAM9G20 SoC.

config SOC_AT91SAM9261
bool "AT91SAM9261 or AT91SAM9G10"
select HAVE_FB_ATMEL
select SOC_AT91SAM9
select HAVE_AT91_USB_CLK
help
Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC.

config SOC_AT91SAM9263
bool "AT91SAM9263"
select HAVE_FB_ATMEL
select SOC_AT91SAM9
select HAVE_AT91_USB_CLK

config SOC_AT91SAM9RL
bool "AT91SAM9RL"
select HAVE_FB_ATMEL
select SOC_AT91SAM9
select HAVE_AT91_UTMI

config SOC_AT91SAM9G45
bool "AT91SAM9G45 or AT91SAM9M10 families"
select HAVE_FB_ATMEL
select SOC_AT91SAM9
select HAVE_AT91_UTMI
select HAVE_AT91_USB_CLK
help
Select this if you are using one of Atmel's AT91SAM9G45 family SoC.
This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11.

config SOC_AT91SAM9X5
bool "AT91SAM9x5 family"
select HAVE_FB_ATMEL
select SOC_AT91SAM9
select HAVE_AT91_UTMI
config SOC_AT91SAM9
bool "AT91SAM9"
select ATMEL_AIC_IRQ
select ATMEL_SDRAMC
select COMMON_CLK_AT91
select CPU_ARM926T
select GENERIC_CLOCKEVENTS
select HAVE_AT91_SMD
select HAVE_AT91_USB_CLK
help
Select this if you are using one of Atmel's AT91SAM9x5 family SoC.
This means that your SAM9 name finishes with a '5' (except if it is
AT91SAM9G45!).
This support covers AT91SAM9G15, AT91SAM9G25, AT91SAM9X25, AT91SAM9G35
and AT91SAM9X35.

config SOC_AT91SAM9N12
bool "AT91SAM9N12 family"
select HAVE_AT91_UTMI
select HAVE_FB_ATMEL
select SOC_AT91SAM9
select HAVE_AT91_USB_CLK
select MEMORY
help
Select this if you are using Atmel's AT91SAM9N12 SoC.

# ----------------------------------------------------------
Select this if you are using one of those Atmel SoC:
AT91SAM9260
AT91SAM9261
AT91SAM9263
AT91SAM9G15
AT91SAM9G20
AT91SAM9G25
AT91SAM9G35
AT91SAM9G45
AT91SAM9G46
AT91SAM9M10
AT91SAM9M11
AT91SAM9N12
AT91SAM9RL
AT91SAM9X25
AT91SAM9X35
AT91SAM9XE
endif # SOC_SAM_V4_V5

comment "AT91 Feature Selections"
Expand Down
18 changes: 2 additions & 16 deletions arch/arm/mach-at91/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,8 @@ obj-$(CONFIG_SOC_AT91SAM9) += sam9_smc.o

# CPU-specific support
obj-$(CONFIG_SOC_AT91RM9200) += at91rm9200.o at91rm9200_time.o
obj-$(CONFIG_SOC_AT91SAM9260) += at91sam9260.o
obj-$(CONFIG_SOC_AT91SAM9261) += at91sam9261.o
obj-$(CONFIG_SOC_AT91SAM9263) += at91sam9263.o
obj-$(CONFIG_SOC_AT91SAM9G45) += at91sam9g45.o
obj-$(CONFIG_SOC_AT91SAM9N12) += at91sam9n12.o
obj-$(CONFIG_SOC_AT91SAM9X5) += at91sam9x5.o
obj-$(CONFIG_SOC_AT91SAM9RL) += at91sam9rl.o
obj-$(CONFIG_SOC_SAMA5D3) += sama5d3.o
obj-$(CONFIG_SOC_SAMA5D4) += sama5d4.o

# AT91SAM board with device-tree
obj-$(CONFIG_SOC_AT91RM9200) += board-dt-rm9200.o
obj-$(CONFIG_SOC_AT91SAM9) += board-dt-sam9.o

# SAMA5 board with device-tree
obj-$(CONFIG_SOC_SAMA5) += board-dt-sama5.o
obj-$(CONFIG_SOC_AT91SAM9) += at91sam9.o
obj-$(CONFIG_SOC_SAMA5) += sama5.o

# Power Management
obj-$(CONFIG_PM) += pm.o
Expand Down
57 changes: 39 additions & 18 deletions arch/arm/mach-at91/at91rm9200.c
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
/*
* arch/arm/mach-at91/at91rm9200.c
* Setup code for AT91RM9200
*
* Copyright (C) 2005 SAN People
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* Copyright (C) 2011 Atmel,
* 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
* 2012 Joachim Eastwood <manabian@gmail.com>
*
* Licensed under GPLv2 or later.
*/

#include <linux/types.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/clk/at91_pmc.h>
#include <linux/gpio.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/clk-provider.h>

#include <asm/setup.h>
#include <asm/irq.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <asm/system_misc.h>

#include <mach/at91_st.h>
#include <mach/hardware.h>

#include "soc.h"
#include "generic.h"


static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd)
{
/*
Expand All @@ -31,16 +37,31 @@ static void at91rm9200_restart(enum reboot_mode reboot_mode, const char *cmd)
at91_st_write(AT91_ST_CR, AT91_ST_WDRST);
}

/* --------------------------------------------------------------------
* AT91RM9200 processor initialization
* -------------------------------------------------------------------- */
static void __init at91rm9200_dt_timer_init(void)
{
of_clk_init(NULL);
at91rm9200_timer_init();
}

static void __init at91rm9200_initialize(void)
static void __init at91rm9200_dt_device_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);

arm_pm_idle = at91rm9200_idle;
arm_pm_restart = at91rm9200_restart;
at91rm9200_pm_init();
}

AT91_SOC_START(at91rm9200)
.init = at91rm9200_initialize,
AT91_SOC_END


static const char *at91rm9200_dt_board_compat[] __initconst = {
"atmel,at91rm9200",
NULL
};

DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200")
.init_time = at91rm9200_dt_timer_init,
.map_io = at91_map_io,
.init_machine = at91rm9200_dt_device_init,
.dt_compat = at91rm9200_dt_board_compat,
MACHINE_END
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Setup code for AT91SAM Evaluation Kits with Device Tree support
* Setup code for AT91SAM9
*
* Copyright (C) 2011 Atmel,
* 2011 Nicolas Ferre <nicolas.ferre@atmel.com>
Expand All @@ -25,57 +25,55 @@

#include "generic.h"

static void __init sam9_dt_device_init(void)
static void __init at91sam9_dt_device_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);

arm_pm_idle = at91sam9_idle;
at91_sam9260_pm_init();
at91sam9260_pm_init();
}

static const char *at91_dt_board_compat[] __initconst = {
"atmel,at91sam9",
NULL
};

DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM (Device Tree)")
DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM9")
/* Maintainer: Atmel */
.map_io = at91_map_io,
.init_early = at91_dt_initialize,
.init_machine = sam9_dt_device_init,
.init_machine = at91sam9_dt_device_init,
.dt_compat = at91_dt_board_compat,
MACHINE_END

static void __init sam9g45_dt_device_init(void)
static void __init at91sam9g45_dt_device_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);

arm_pm_idle = at91sam9_idle;
at91_sam9g45_pm_init();
at91sam9g45_pm_init();
}

static const char *at91_9g45_board_compat[] __initconst = {
static const char *at91sam9g45_board_compat[] __initconst = {
"atmel,at91sam9g45",
NULL
};

DT_MACHINE_START(at91sam9g45_dt, "Atmel AT91SAM9G45")
/* Maintainer: Atmel */
.map_io = at91_map_io,
.init_early = at91_dt_initialize,
.init_machine = sam9g45_dt_device_init,
.dt_compat = at91_9g45_board_compat,
.init_machine = at91sam9g45_dt_device_init,
.dt_compat = at91sam9g45_board_compat,
MACHINE_END

static void __init sam9x5_dt_device_init(void)
static void __init at91sam9x5_dt_device_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);

arm_pm_idle = at91sam9_idle;
at91_sam9x5_pm_init();
at91sam9x5_pm_init();
}

static const char *at91_9x5_board_compat[] __initconst = {
static const char *at91sam9x5_board_compat[] __initconst = {
"atmel,at91sam9x5",
"atmel,at91sam9n12",
NULL
Expand All @@ -84,7 +82,6 @@ static const char *at91_9x5_board_compat[] __initconst = {
DT_MACHINE_START(at91sam9x5_dt, "Atmel AT91SAM9")
/* Maintainer: Atmel */
.map_io = at91_map_io,
.init_early = at91_dt_initialize,
.init_machine = sam9x5_dt_device_init,
.dt_compat = at91_9x5_board_compat,
.init_machine = at91sam9x5_dt_device_init,
.dt_compat = at91sam9x5_board_compat,
MACHINE_END
26 changes: 0 additions & 26 deletions arch/arm/mach-at91/at91sam9260.c

This file was deleted.

Loading

0 comments on commit df1a668

Please sign in to comment.