]> Git Repo - linux.git/commitdiff
Merge tag 'for-3.8-at91_header_clean' of git://github.com/at91linux/linux-at91 into...
authorArnd Bergmann <[email protected]>
Mon, 12 Nov 2012 21:54:08 +0000 (22:54 +0100)
committerArnd Bergmann <[email protected]>
Mon, 12 Nov 2012 21:54:08 +0000 (22:54 +0100)
From Jean-Christophe PLAGNIOL-VILLARD <[email protected]>:
arm: at91: mach header cleanup

This first patch serie start the cleanup of the header in mach
by moving all the platform data to include/linux/platform_data

and move the board header and drivers header next to them

* tag 'for-3.8-at91_header_clean' of git://github.com/at91linux/linux-at91:
  arm: at91: move at91rm9200 rtc header in drivers/rtc
  arm: at91: move reset controller header to arm/arm/mach-at91
  arm: at91: move pit define to the driver
  arm: at91: move at91_shdwc.h to arch/arm/mach-at91
  arm: at91: move board header to arch/arm/mach-at91
  arn: at91: move at91_tc.h to arch/arm/mach-at91
  arm: at91 move at91_aic.h to arch/arm/mach-at91
  arm: at91 move board.h to arch/arm/mach-at91
  arm: at91: move platfarm_data to include/linux/platform_data/atmel.h
  arm: at91: drop machine defconfig

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Cc: Nicolas Ferre <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
1  2 
arch/arm/Kconfig
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/clock33xx_data.c
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/serial.c
drivers/staging/tidspbridge/include/dspbridge/host_os.h
drivers/usb/musb/musb_dsps.c

diff --combined arch/arm/Kconfig
index 6207cf734b2b21213cd54d108623a695a229c604,ade7e924bef5faaf00de76c0354e025ed4371b35..041cf07747766e4e18195a500137ba43916d16d5
@@@ -937,6 -937,7 +937,6 @@@ config ARCH_OMA
        select CLKSRC_MMIO
        select GENERIC_CLOCKEVENTS
        select HAVE_CLK
 -      select NEED_MACH_GPIO_H
        help
          Support for TI's OMAP platform (OMAP1/2/3/4).
  
@@@ -1602,8 -1603,8 +1602,8 @@@ config NR_CPU
        default "4"
  
  config HOTPLUG_CPU
-       bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
-       depends on SMP && HOTPLUG && EXPERIMENTAL
+       bool "Support for hot-pluggable CPUs"
+       depends on SMP && HOTPLUG
        help
          Say Y here to experiment with turning CPUs off and on.  CPUs
          can be controlled through /sys/devices/system/cpu.
@@@ -1644,8 -1645,8 +1644,8 @@@ config H
        default 100
  
  config THUMB2_KERNEL
-       bool "Compile the kernel in Thumb-2 mode (EXPERIMENTAL)"
-       depends on CPU_V7 && !CPU_V6 && !CPU_V6K && EXPERIMENTAL
+       bool "Compile the kernel in Thumb-2 mode"
+       depends on CPU_V7 && !CPU_V6 && !CPU_V6K
        select AEABI
        select ARM_ASM_UNIFIED
        select ARM_UNWIND
@@@ -1849,6 -1850,7 +1849,7 @@@ config XEN_DOM
  config XEN
        bool "Xen guest support on ARM (EXPERIMENTAL)"
        depends on EXPERIMENTAL && ARM && OF
+       depends on CPU_V7 && !CPU_V6
        help
          Say Y if you want to run Linux in a Virtual Machine on Xen on ARM.
  
index 85c09a09c5e38d8936f7a31376c30000e915152e,d41ab98890ffcc45731c7625b3ad7f44d53bb855..5a3800da903fbc999f96f607d516218d774b13d7
@@@ -24,6 -24,7 +24,7 @@@
  #include <linux/input.h>
  #include <linux/gpio_keys.h>
  #include <linux/opp.h>
+ #include <linux/cpu.h>
  
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
  #include <asm/mach/map.h>
  #include <asm/mach/flash.h>
  
 -#include "common.h"
  #include <video/omapdss.h>
  #include <video/omap-panel-tfp410.h>
 -#include <plat/gpmc.h>
  #include <linux/platform_data/mtd-nand-omap2.h>
 -#include <plat/usb.h>
 -#include <plat/omap_device.h>
  
 +#include "common.h"
 +#include "omap_device.h"
 +#include "gpmc.h"
 +#include "soc.h"
  #include "mux.h"
  #include "hsmmc.h"
  #include "pm.h"
 +#include "board-flash.h"
  #include "common-board-devices.h"
  
 +#define       NAND_CS 0
 +
  /*
   * OMAP3 Beagle revision
   * Run time detection of Beagle revision is done by reading GPIO.
@@@ -447,27 -445,31 +448,31 @@@ static struct omap_board_mux board_mux[
  };
  #endif
  
- static void __init beagle_opp_init(void)
+ static int __init beagle_opp_init(void)
  {
        int r = 0;
  
-       /* Initialize the omap3 opp table */
-       if (omap3_opp_init()) {
+       if (!machine_is_omap3_beagle())
+               return 0;
+       /* Initialize the omap3 opp table if not already created. */
+       r = omap3_opp_init();
+       if (IS_ERR_VALUE(r) && (r != -EEXIST)) {
                pr_err("%s: opp default init failed\n", __func__);
-               return;
+               return r;
        }
  
        /* Custom OPP enabled for all xM versions */
        if (cpu_is_omap3630()) {
                struct device *mpu_dev, *iva_dev;
  
-               mpu_dev = omap_device_get_by_hwmod_name("mpu");
+               mpu_dev = get_cpu_device(0);
                iva_dev = omap_device_get_by_hwmod_name("iva");
  
                if (IS_ERR(mpu_dev) || IS_ERR(iva_dev)) {
                        pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n",
                                __func__, mpu_dev, iva_dev);
-                       return;
+                       return -ENODEV;
                }
                /* Enable MPU 1GHz and lower opps */
                r = opp_enable(mpu_dev, 800000000);
                        opp_disable(iva_dev, 660000000);
                }
        }
-       return;
+       return 0;
  }
+ device_initcall(beagle_opp_init);
  
  static void __init omap3_beagle_init(void)
  {
  
        usb_musb_init(NULL);
        usbhs_init(&usbhs_bdata);
 -      omap_nand_flash_init(NAND_BUSWIDTH_16, omap3beagle_nand_partitions,
 -                           ARRAY_SIZE(omap3beagle_nand_partitions));
 +      board_nand_init(omap3beagle_nand_partitions,
 +                      ARRAY_SIZE(omap3beagle_nand_partitions), NAND_CS,
 +                      NAND_BUSWIDTH_16, NULL);
        omap_twl4030_audio_init("omap3beagle");
  
        /* Ensure msecure is mux'd to be able to set the RTC. */
        /* Ensure SDRC pins are mux'd for self-refresh */
        omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
        omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
-       beagle_opp_init();
  }
  
  MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
index 1cb79cc5808981b7600981c941aa4633f384b08e,1a45d6bd253921a9b8e8f646f568c868a0b4df85..17e3de51bcba24244ee3093295705d864b214ce3
@@@ -17,8 -17,9 +17,8 @@@
  #include <linux/kernel.h>
  #include <linux/list.h>
  #include <linux/clk.h>
 -#include <plat/clkdev_omap.h>
  
 -#include "am33xx.h"
 +#include "soc.h"
  #include "iomap.h"
  #include "control.h"
  #include "clock.h"
@@@ -1072,6 -1073,8 +1072,8 @@@ static struct omap_clk am33xx_clks[] = 
        CLK(NULL,       "gfx_fck_div_ck",       &gfx_fck_div_ck,        CK_AM33XX),
        CLK(NULL,       "sysclkout_pre_ck",     &sysclkout_pre_ck,      CK_AM33XX),
        CLK(NULL,       "clkout2_ck",           &clkout2_ck,    CK_AM33XX),
+       CLK(NULL,       "timer_32k_ck",         &clkdiv32k_ick, CK_AM33XX),
+       CLK(NULL,       "timer_sys_ck",         &sys_clkin_ck,  CK_AM33XX),
  };
  
  int __init am33xx_clk_init(void)
                cpu_clkflg = CK_AM33XX;
        }
  
 -      clk_init(&omap2_clk_functions);
 -
        for (c = am33xx_clks; c < am33xx_clks + ARRAY_SIZE(am33xx_clks); c++)
                clk_preinit(c->lk.clk);
  
index b16caea312ed16be86cd37ce146c812fdf6ac6af,3a904de4313ec82deb6b4f2e61d460e318ef0e87..a8b43da0b6f4d69b1671702bb996a59b8637d4c7
  
  #include <trace/events/power.h>
  
 +#include <asm/fncpy.h>
  #include <asm/suspend.h>
  #include <asm/system_misc.h>
  
 -#include <plat/sram.h>
  #include "clockdomain.h"
  #include "powerdomain.h"
 -#include <plat/sdrc.h>
  #include <plat/prcm.h>
 -#include <plat/gpmc.h>
 -#include <plat/dma.h>
 +#include <plat-omap/dma-omap.h>
  
 +#include "soc.h"
  #include "common.h"
 -#include "cm2xxx_3xxx.h"
 +#include "cm3xxx.h"
  #include "cm-regbits-34xx.h"
 +#include "gpmc.h"
  #include "prm-regbits-34xx.h"
 -
 -#include "prm2xxx_3xxx.h"
 +#include "prm3xxx.h"
  #include "pm.h"
  #include "sdrc.h"
 +#include "sram.h"
  #include "control.h"
  
  /* pm34xx errata defined in pm.h */
@@@ -652,14 -652,17 +652,17 @@@ static void __init pm_errata_configure(
                /* Enable the l2 cache toggling in sleep logic */
                enable_omap3630_toggle_l2_on_restore();
                if (omap_rev() < OMAP3630_REV_ES1_2)
-                       pm34xx_errata |= PM_SDRC_WAKEUP_ERRATUM_i583;
+                       pm34xx_errata |= (PM_SDRC_WAKEUP_ERRATUM_i583 |
+                                         PM_PER_MEMORIES_ERRATUM_i582);
+       } else if (cpu_is_omap34xx()) {
+               pm34xx_errata |= PM_PER_MEMORIES_ERRATUM_i582;
        }
  }
  
  int __init omap3_pm_init(void)
  {
        struct power_state *pwrst, *tmp;
-       struct clockdomain *neon_clkdm, *mpu_clkdm;
+       struct clockdomain *neon_clkdm, *mpu_clkdm, *per_clkdm, *wkup_clkdm;
        int ret;
  
        if (!omap3_has_io_chain_ctrl())
  
        neon_clkdm = clkdm_lookup("neon_clkdm");
        mpu_clkdm = clkdm_lookup("mpu_clkdm");
+       per_clkdm = clkdm_lookup("per_clkdm");
+       wkup_clkdm = clkdm_lookup("wkup_clkdm");
  
  #ifdef CONFIG_SUSPEND
        omap_pm_suspend = omap3_pm_suspend;
        if (IS_PM34XX_ERRATUM(PM_RTA_ERRATUM_i608))
                omap3630_ctrl_disable_rta();
  
+       /*
+        * The UART3/4 FIFO and the sidetone memory in McBSP2/3 are
+        * not correctly reset when the PER powerdomain comes back
+        * from OFF or OSWR when the CORE powerdomain is kept active.
+        * See OMAP36xx Erratum i582 "PER Domain reset issue after
+        * Domain-OFF/OSWR Wakeup".  This wakeup dependency is not a
+        * complete workaround.  The kernel must also prevent the PER
+        * powerdomain from going to OSWR/OFF while the CORE
+        * powerdomain is not going to OSWR/OFF.  And if PER last
+        * power state was off while CORE last power state was ON, the
+        * UART3/4 and McBSP2/3 SIDETONE devices need to run a
+        * self-test using their loopback tests; if that fails, those
+        * devices are unusable until the PER/CORE can complete a transition
+        * from ON to OSWR/OFF and then back to ON.
+        *
+        * XXX Technically this workaround is only needed if off-mode
+        * or OSWR is enabled.
+        */
+       if (IS_PM34XX_ERRATUM(PM_PER_MEMORIES_ERRATUM_i582))
+               clkdm_add_wkdep(per_clkdm, wkup_clkdm);
        clkdm_add_wkdep(neon_clkdm, mpu_clkdm);
        if (omap_type() != OMAP2_DEVICE_TYPE_GP) {
                omap3_secure_ram_storage =
index 812976eac5364818033e4626e31f14de24c5865f,a507cd6cf4f12259ab6a0bbad75fdc2e38bbe3a8..aa30a3c2088303f4964d029ab6ca2faa5e096240
  #include <linux/console.h>
  
  #include <plat/omap-serial.h>
 -#include "common.h"
 -#include <plat/dma.h>
 -#include <plat/omap_hwmod.h>
 -#include <plat/omap_device.h>
 -#include <plat/omap-pm.h>
 -#include <plat/serial.h>
 +#include <plat-omap/dma-omap.h>
  
 +#include "common.h"
 +#include "omap_hwmod.h"
 +#include "omap_device.h"
 +#include "omap-pm.h"
 +#include "soc.h"
  #include "prm2xxx_3xxx.h"
  #include "pm.h"
  #include "cm2xxx_3xxx.h"
  #include "prm-regbits-34xx.h"
  #include "control.h"
  #include "mux.h"
 +#include "serial.h"
  
  /*
   * NOTE: By default the serial auto_suspend timeout is disabled as it causes
@@@ -330,6 -329,11 +330,11 @@@ void __init omap_serial_init_port(struc
  
        oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
  
+       if (console_uart_id == bdata->id) {
+               omap_device_enable(pdev);
+               pm_runtime_set_active(&pdev->dev);
+       }
        oh->dev_attr = uart;
  
        if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads)
index 896f1579d5d7be4d3e07e6a77579f3913f90d56c,5e2f4d82d925fbf76b628299347c4f83a86321a3..7f3a1db316199ac4618d3e57a6162b27ed305282
  #include <linux/vmalloc.h>
  #include <linux/ioport.h>
  #include <linux/platform_device.h>
 -#include <plat/clock.h>
  #include <linux/clk.h>
  #include <plat/mailbox.h>
  #include <linux/pagemap.h>
  #include <asm/cacheflush.h>
  #include <linux/dma-mapping.h>
  
- /* TODO -- Remove, once BP defines them */
- #define INT_DSP_MMU_IRQ        28
+ /* TODO -- Remove, once omap-iommu is used */
+ #define INT_DSP_MMU_IRQ        (28 + NR_IRQS)
  
  #define PRCM_VDD1 1
  
index a67af21c1460125c5bb1eb23dd4ced8552973c4a,ff5f112053d28f114e4d90844b7aa2172f3856d4..aa34f22181c13c9e31969d3ab3ee13656fb370d4
  #include <linux/pm_runtime.h>
  #include <linux/module.h>
  #include <linux/usb/nop-usb-xceiv.h>
 +#include <linux/platform_data/usb-omap.h>
  
  #include <linux/of.h>
  #include <linux/of_device.h>
  #include <linux/of_address.h>
  
 -#include <plat/usb.h>
 -
  #include "musb_core.h"
  
  #ifdef CONFIG_OF
@@@ -457,11 -458,11 +457,11 @@@ static int __devinit dsps_create_musb_p
        struct platform_device  *musb;
        struct resource *res;
        struct resource resources[2];
-       char res_name[10];
+       char res_name[11];
        int ret, musbid;
  
        /* get memory resource */
-       sprintf(res_name, "musb%d", id);
+       snprintf(res_name, sizeof(res_name), "musb%d", id);
        res = platform_get_resource_byname(pdev, IORESOURCE_MEM, res_name);
        if (!res) {
                dev_err(dev, "%s get mem resource failed\n", res_name);
        resources[0] = *res;
  
        /* get irq resource */
-       sprintf(res_name, "musb%d-irq", id);
+       snprintf(res_name, sizeof(res_name), "musb%d-irq", id);
        res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, res_name);
        if (!res) {
                dev_err(dev, "%s get irq resource failed\n", res_name);
  
                of_property_read_u32(np, "num-eps", (u32 *)&config->num_eps);
                of_property_read_u32(np, "ram-bits", (u32 *)&config->ram_bits);
-               sprintf(res_name, "port%d-mode", id);
+               snprintf(res_name, sizeof(res_name), "port%d-mode", id);
                of_property_read_u32(np, res_name, (u32 *)&pdata->mode);
                of_property_read_u32(np, "power", (u32 *)&pdata->power);
                config->multipoint = of_property_read_bool(np, "multipoint");
This page took 0.113739 seconds and 4 git commands to generate.