Skip to content

Commit

Permalink
Merge tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ar…
Browse files Browse the repository at this point in the history
…m/arm-soc

Pull ARM SoC bug fixes from Arnd Bergmann:
 "Things are calming down for arm-soc as well.  This set of bug fixes is
  dominated in size by the at91 platform bug fixes.  Some of them were
  meant to go through the framebuffer tree during the merge window, but
  since the framebuffer maintainer could not be reached, I offered to
  take them here.  The other notable at91 change is the addition of
  pinctrl definitions to fix the NAND controller.

  The rest are mostly simple regression fixes:

   - Our removal of VIRT_TO_BUS conflicted with Stephen Rothwell's
     renaming of the Kconfig symbol.  You will get a trivial merge
     conflict here, we still want to remove it.
   - missing bits for clocks on imx and s5pv210
   - missing header inclusions in mmp and shmobile
   - typos in s5pv210 camera and vt8500 clock support code

  and three trivial fixes for pre-3.8 bugs:

   - an old bogus build warning in the joystick driver
   - a misleading Kconfig description
   - a NULL pointer check on davinci"

* tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: fix CONFIG_VIRT_TO_BUS handling
  ARM: i.MX35: enable MAX clock
  ARM: Scorpion is a v7 architecture, not v6
  ARM: mmp: add platform_device head file in gplugd
  input/joystick: use get_cycles on ARM
  [media] s5p-fimc: fix s5pv210 build
  clk: vt8500: Fix "fix device clock divisor calculations"
  ARM: i.MX25: Fix DT compilation
  ARM: at91: fix infinite loop in at91_irq_suspend/resume
  ARM: at91: add gpio suspend/resume support when using pinctrl
  ARM: at91: fix LCD-wiring mode
  atmel_lcdfb: fix 16-bpp modes on older SOCs
  ARM: at91: dt: at91sam9x5: complete NAND pinctrl
  ARM: at91: dt: at91sam9x5: correct NAND pins comments
  ARM: davinci: edma: fix dmaengine induced null pointer dereference on da830
  ARM: shmobile: marzen: Include mmc/host.h
  ARM: EXYNOS: Add #dma-cells for generic dma binding support for PL330
  ARM: S5PV210: Fix PL330 DMA controller clkdev entries
  • Loading branch information
Linus Torvalds committed Mar 18, 2013
2 parents a15cd06 + b4811ba commit 1c6ba37
Show file tree
Hide file tree
Showing 20 changed files with 179 additions and 58 deletions.
11 changes: 4 additions & 7 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ config ARM
select HAVE_REGS_AND_STACK_ACCESS_API
select HAVE_SYSCALL_TRACEPOINTS
select HAVE_UID16
select VIRT_TO_BUS
select KTIME_SCALAR
select PERF_USE_VMALLOC
select RTC_LIB
Expand Down Expand Up @@ -743,6 +742,7 @@ config ARCH_RPC
select NEED_MACH_IO_H
select NEED_MACH_MEMORY_H
select NO_IOPORT
select VIRT_TO_BUS
help
On the Acorn Risc-PC, Linux can support the internal IDE disk and
CD-ROM interface, serial and parallel port, and the floppy drive.
Expand Down Expand Up @@ -878,6 +878,7 @@ config ARCH_SHARK
select ISA_DMA
select NEED_MACH_MEMORY_H
select PCI
select VIRT_TO_BUS
select ZONE_DMA
help
Support for the StrongARM based Digital DNARD machine, also known
Expand Down Expand Up @@ -1005,12 +1006,12 @@ config ARCH_MULTI_V4_V5
bool

config ARCH_MULTI_V6
bool "ARMv6 based platforms (ARM11, Scorpion, ...)"
bool "ARMv6 based platforms (ARM11)"
select ARCH_MULTI_V6_V7
select CPU_V6

config ARCH_MULTI_V7
bool "ARMv7 based platforms (Cortex-A, PJ4, Krait)"
bool "ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)"
default y
select ARCH_MULTI_V6_V7
select ARCH_VEXPRESS
Expand Down Expand Up @@ -1461,10 +1462,6 @@ config ISA_DMA
bool
select ISA_DMA_API

config ARCH_NO_VIRT_TO_BUS
def_bool y
depends on !ARCH_RPC && !ARCH_NETWINDER && !ARCH_SHARK

# Select ISA DMA interface
config ISA_DMA_API
bool
Expand Down
28 changes: 26 additions & 2 deletions arch/arm/boot/dts/at91sam9x5.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,32 @@
nand {
pinctrl_nand: nand-0 {
atmel,pins =
<3 4 0x0 0x1 /* PD5 gpio RDY pin pull_up */
3 5 0x0 0x1>; /* PD4 gpio enable pin pull_up */
<3 0 0x1 0x0 /* PD0 periph A Read Enable */
3 1 0x1 0x0 /* PD1 periph A Write Enable */
3 2 0x1 0x0 /* PD2 periph A Address Latch Enable */
3 3 0x1 0x0 /* PD3 periph A Command Latch Enable */
3 4 0x0 0x1 /* PD4 gpio Chip Enable pin pull_up */
3 5 0x0 0x1 /* PD5 gpio RDY/BUSY pin pull_up */
3 6 0x1 0x0 /* PD6 periph A Data bit 0 */
3 7 0x1 0x0 /* PD7 periph A Data bit 1 */
3 8 0x1 0x0 /* PD8 periph A Data bit 2 */
3 9 0x1 0x0 /* PD9 periph A Data bit 3 */
3 10 0x1 0x0 /* PD10 periph A Data bit 4 */
3 11 0x1 0x0 /* PD11 periph A Data bit 5 */
3 12 0x1 0x0 /* PD12 periph A Data bit 6 */
3 13 0x1 0x0>; /* PD13 periph A Data bit 7 */
};

pinctrl_nand_16bits: nand_16bits-0 {
atmel,pins =
<3 14 0x1 0x0 /* PD14 periph A Data bit 8 */
3 15 0x1 0x0 /* PD15 periph A Data bit 9 */
3 16 0x1 0x0 /* PD16 periph A Data bit 10 */
3 17 0x1 0x0 /* PD17 periph A Data bit 11 */
3 18 0x1 0x0 /* PD18 periph A Data bit 12 */
3 19 0x1 0x0 /* PD19 periph A Data bit 13 */
3 20 0x1 0x0 /* PD20 periph A Data bit 14 */
3 21 0x1 0x0>; /* PD21 periph A Data bit 15 */
};
};

Expand Down
9 changes: 9 additions & 0 deletions arch/arm/boot/dts/exynos4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -275,18 +275,27 @@
compatible = "arm,pl330", "arm,primecell";
reg = <0x12680000 0x1000>;
interrupts = <0 35 0>;
#dma-cells = <1>;
#dma-channels = <8>;
#dma-requests = <32>;
};

pdma1: pdma@12690000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x12690000 0x1000>;
interrupts = <0 36 0>;
#dma-cells = <1>;
#dma-channels = <8>;
#dma-requests = <32>;
};

mdma1: mdma@12850000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x12850000 0x1000>;
interrupts = <0 34 0>;
#dma-cells = <1>;
#dma-channels = <8>;
#dma-requests = <1>;
};
};
};
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/exynos5440.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,18 @@
compatible = "arm,pl330", "arm,primecell";
reg = <0x120000 0x1000>;
interrupts = <0 34 0>;
#dma-cells = <1>;
#dma-channels = <8>;
#dma-requests = <32>;
};

pdma1: pdma@121B0000 {
compatible = "arm,pl330", "arm,primecell";
reg = <0x121000 0x1000>;
interrupts = <0 35 0>;
#dma-cells = <1>;
#dma-channels = <8>;
#dma-requests = <32>;
};
};

Expand Down
8 changes: 8 additions & 0 deletions arch/arm/mach-at91/include/mach/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ extern int at91_get_gpio_value(unsigned pin);
extern void at91_gpio_suspend(void);
extern void at91_gpio_resume(void);

#ifdef CONFIG_PINCTRL_AT91
extern void at91_pinctrl_gpio_suspend(void);
extern void at91_pinctrl_gpio_resume(void);
#else
static inline void at91_pinctrl_gpio_suspend(void) {}
static inline void at91_pinctrl_gpio_resume(void) {}
#endif

#endif /* __ASSEMBLY__ */

#endif
20 changes: 8 additions & 12 deletions arch/arm/mach-at91/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,21 @@ static int at91_aic_set_wake(struct irq_data *d, unsigned value)

void at91_irq_suspend(void)
{
int i = 0, bit;
int bit = -1;

if (has_aic5()) {
/* disable enabled irqs */
while ((bit = find_next_bit(backups, n_irqs, i)) < n_irqs) {
while ((bit = find_next_bit(backups, n_irqs, bit + 1)) < n_irqs) {
at91_aic_write(AT91_AIC5_SSR,
bit & AT91_AIC5_INTSEL_MSK);
at91_aic_write(AT91_AIC5_IDCR, 1);
i = bit;
}
/* enable wakeup irqs */
i = 0;
while ((bit = find_next_bit(wakeups, n_irqs, i)) < n_irqs) {
bit = -1;
while ((bit = find_next_bit(wakeups, n_irqs, bit + 1)) < n_irqs) {
at91_aic_write(AT91_AIC5_SSR,
bit & AT91_AIC5_INTSEL_MSK);
at91_aic_write(AT91_AIC5_IECR, 1);
i = bit;
}
} else {
at91_aic_write(AT91_AIC_IDCR, *backups);
Expand All @@ -118,23 +116,21 @@ void at91_irq_suspend(void)

void at91_irq_resume(void)
{
int i = 0, bit;
int bit = -1;

if (has_aic5()) {
/* disable wakeup irqs */
while ((bit = find_next_bit(wakeups, n_irqs, i)) < n_irqs) {
while ((bit = find_next_bit(wakeups, n_irqs, bit + 1)) < n_irqs) {
at91_aic_write(AT91_AIC5_SSR,
bit & AT91_AIC5_INTSEL_MSK);
at91_aic_write(AT91_AIC5_IDCR, 1);
i = bit;
}
/* enable irqs disabled for suspend */
i = 0;
while ((bit = find_next_bit(backups, n_irqs, i)) < n_irqs) {
bit = -1;
while ((bit = find_next_bit(backups, n_irqs, bit + 1)) < n_irqs) {
at91_aic_write(AT91_AIC5_SSR,
bit & AT91_AIC5_INTSEL_MSK);
at91_aic_write(AT91_AIC5_IECR, 1);
i = bit;
}
} else {
at91_aic_write(AT91_AIC_IDCR, *wakeups);
Expand Down
10 changes: 8 additions & 2 deletions arch/arm/mach-at91/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ extern u32 at91_slow_clock_sz;

static int at91_pm_enter(suspend_state_t state)
{
at91_gpio_suspend();
if (of_have_populated_dt())
at91_pinctrl_gpio_suspend();
else
at91_gpio_suspend();
at91_irq_suspend();

pr_debug("AT91: PM - wake mask %08x, pm state %d\n",
Expand Down Expand Up @@ -286,7 +289,10 @@ static int at91_pm_enter(suspend_state_t state)
error:
target_state = PM_SUSPEND_ON;
at91_irq_resume();
at91_gpio_resume();
if (of_have_populated_dt())
at91_pinctrl_gpio_resume();
else
at91_gpio_resume();
return 0;
}

Expand Down
3 changes: 3 additions & 0 deletions arch/arm/mach-davinci/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,9 @@ EXPORT_SYMBOL(edma_free_channel);
*/
int edma_alloc_slot(unsigned ctlr, int slot)
{
if (!edma_cc[ctlr])
return -EINVAL;

if (slot >= 0)
slot = EDMA_CHAN_SLOT(slot);

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-footbridge/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ config ARCH_NETWINDER
select ISA
select ISA_DMA
select PCI
select VIRT_TO_BUS
help
Say Y here if you intend to run this kernel on the Rebel.COM
NetWinder. Information about this machine can be found at:
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-imx/clk-imx35.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ int __init mx35_clocks_init(void)
clk_prepare_enable(clk[gpio3_gate]);
clk_prepare_enable(clk[iim_gate]);
clk_prepare_enable(clk[emi_gate]);
clk_prepare_enable(clk[max_gate]);

/*
* SCC is needed to boot via mmc after a watchdog reset. The clock code
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/mach-imx/imx25-dt.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ static const char * const imx25_dt_board_compat[] __initconst = {
NULL
};

static void __init imx25_timer_init(void)
{
mx25_clocks_init_dt();
}

DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)")
.map_io = mx25_map_io,
.init_early = imx25_init_early,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-mmp/gplugd.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/

#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/gpio.h>

#include <asm/mach/arch.h>
Expand Down
36 changes: 18 additions & 18 deletions arch/arm/mach-s5pv210/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,6 @@ static struct clk clk_pcmcdclk2 = {
.name = "pcmcdclk",
};

static struct clk dummy_apb_pclk = {
.name = "apb_pclk",
.id = -1,
};

static struct clk *clkset_vpllsrc_list[] = {
[0] = &clk_fin_vpll,
[1] = &clk_sclk_hdmi27m,
Expand Down Expand Up @@ -305,18 +300,6 @@ static struct clk_ops clk_fout_apll_ops = {

static struct clk init_clocks_off[] = {
{
.name = "dma",
.devname = "dma-pl330.0",
.parent = &clk_hclk_psys.clk,
.enable = s5pv210_clk_ip0_ctrl,
.ctrlbit = (1 << 3),
}, {
.name = "dma",
.devname = "dma-pl330.1",
.parent = &clk_hclk_psys.clk,
.enable = s5pv210_clk_ip0_ctrl,
.ctrlbit = (1 << 4),
}, {
.name = "rot",
.parent = &clk_hclk_dsys.clk,
.enable = s5pv210_clk_ip0_ctrl,
Expand Down Expand Up @@ -573,6 +556,20 @@ static struct clk clk_hsmmc3 = {
.ctrlbit = (1<<19),
};

static struct clk clk_pdma0 = {
.name = "pdma0",
.parent = &clk_hclk_psys.clk,
.enable = s5pv210_clk_ip0_ctrl,
.ctrlbit = (1 << 3),
};

static struct clk clk_pdma1 = {
.name = "pdma1",
.parent = &clk_hclk_psys.clk,
.enable = s5pv210_clk_ip0_ctrl,
.ctrlbit = (1 << 4),
};

static struct clk *clkset_uart_list[] = {
[6] = &clk_mout_mpll.clk,
[7] = &clk_mout_epll.clk,
Expand Down Expand Up @@ -1075,6 +1072,8 @@ static struct clk *clk_cdev[] = {
&clk_hsmmc1,
&clk_hsmmc2,
&clk_hsmmc3,
&clk_pdma0,
&clk_pdma1,
};

/* Clock initialisation code */
Expand Down Expand Up @@ -1333,6 +1332,8 @@ static struct clk_lookup s5pv210_clk_lookup[] = {
CLKDEV_INIT(NULL, "spi_busclk0", &clk_p),
CLKDEV_INIT("s5pv210-spi.0", "spi_busclk1", &clk_sclk_spi0.clk),
CLKDEV_INIT("s5pv210-spi.1", "spi_busclk1", &clk_sclk_spi1.clk),
CLKDEV_INIT("dma-pl330.0", "apb_pclk", &clk_pdma0),
CLKDEV_INIT("dma-pl330.1", "apb_pclk", &clk_pdma1),
};

void __init s5pv210_register_clocks(void)
Expand Down Expand Up @@ -1361,6 +1362,5 @@ void __init s5pv210_register_clocks(void)
for (ptr = 0; ptr < ARRAY_SIZE(clk_cdev); ptr++)
s3c_disable_clocks(clk_cdev[ptr], 1);

s3c24xx_register_clock(&dummy_apb_pclk);
s3c_pwmclk_init();
}
2 changes: 1 addition & 1 deletion arch/arm/mach-s5pv210/mach-goni.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ static struct fimc_source_info goni_camera_sensors[] = {
.mux_id = 0,
.flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
V4L2_MBUS_VSYNC_ACTIVE_LOW,
.bus_type = FIMC_BUS_TYPE_ITU_601,
.fimc_bus_type = FIMC_BUS_TYPE_ITU_601,
.board_info = &noon010pc30_board_info,
.i2c_bus_num = 0,
.clk_frequency = 16000000UL,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-shmobile/board-marzen.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/smsc911x.h>
#include <linux/spi/spi.h>
#include <linux/spi/sh_hspi.h>
#include <linux/mmc/host.h>
#include <linux/mmc/sh_mobile_sdhi.h>
#include <linux/mfd/tmio.h>
#include <linux/usb/otg.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/clk/clk-vt8500.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static int vt8500_dclk_set_rate(struct clk_hw *hw, unsigned long rate,
divisor = parent_rate / rate;

/* If prate / rate would be decimal, incr the divisor */
if (rate * divisor < *prate)
if (rate * divisor < parent_rate)
divisor++;

if (divisor == cdev->div_mask + 1)
Expand Down
8 changes: 2 additions & 6 deletions drivers/input/joystick/analog.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,10 @@ static unsigned int get_time_pit(void)
#define GET_TIME(x) rdtscl(x)
#define DELTA(x,y) ((y)-(x))
#define TIME_NAME "TSC"
#elif defined(__alpha__)
#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_TILE)
#define GET_TIME(x) do { x = get_cycles(); } while (0)
#define DELTA(x,y) ((y)-(x))
#define TIME_NAME "PCC"
#elif defined(CONFIG_MN10300) || defined(CONFIG_TILE)
#define GET_TIME(x) do { x = get_cycles(); } while (0)
#define DELTA(x, y) ((x) - (y))
#define TIME_NAME "TSC"
#define TIME_NAME "get_cycles"
#else
#define FAKE_TIME
static unsigned long analog_faketime = 0;
Expand Down
Loading

0 comments on commit 1c6ba37

Please sign in to comment.