Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cac4662a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ARM fixes from Russell King:
 "Most of this update are fixes primarily discovered from testing on the
  older StrongARM 1110 and PXA systems, as a result of recent interest
  from several people in these platforms:

   - Locomo interrupt handling incorrectly stores the handler data in
     the chip's private data slot: when Locomo is combined with an
     interrupt controller who's chip uses the chip private data, this
     leads to an oops.

   - SA1111 was missing a call to clk_disable() to clean up after a
     failed probe.

   - SA1111 and PCMCIA suspend/resume was broken:

     The PCMCIA "ds" layer was using the legacy bus suspend/resume
     methods, which the core PM code is no longer calling as a result of
     device_pm_check_callbacks() introduced in commit aa8e54b5
     ("PM / sleep: Go direct_complete if driver has no callbacks").

     SA1111 was broken due to changes to PCMCIA which makes PCMCIA
     suspend itself later than the SA1111 code expects, and resume
     before the SA1111 code has initialised access to the pcmcia
     sub-device.

   - the default SA1111 interrupt mask polarity got messed up when it
     was converted to use a dynamic interrupt base number for its
     interrupts.

   - fix platform_get_irq() error code propagation, which was causing
     problems on platforms where the interrupt may not be available at
      probe time in DT setups.

   - fix the lack of clock to PCMCIA code on PXA platforms, which was
     omitted in conversions of PXA to CCF.

   - fix an oops in the PXA PCMCIA code caused by a previous commit not
     realising that Lubbock is different from the rest of the PXA PCMCIA
     drivers.

   - ensure that SA1111 low-level PCMCIA drivers propagate their error
     codes to the main probe function, rather than the driver silently
     accepting a failure.

   - fix the sa11xx debugfs reporting of timing information, which
     always indicated zero due to the clock being a factor of 1000 out.

   - fix the polarity of the status change signal reported from the
     sockets.

  Lastly, one ARM specific commit from Stefan Agner fixing the LPAE
  cache attributes"

* 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: pxa/lubbock: add pcmcia clock
  ARM: locomo: fix locomo irq handling
  ARM: 8612/1: LPAE: initialize cache policy correctly
  ARM: sa1111: fix missing clk_disable()
  ARM: sa1111: fix pcmcia suspend/resume
  ARM: sa1111: fix pcmcia interrupt mask polarity
  ARM: sa1111: fix error code propagation in sa1111_probe()
  pcmcia: lubbock: fix sockets configuration
  pcmcia: sa1111: fix propagation of lowlevel board init return code
  pcmcia: soc_common: fix SS_STSCHG polarity
  pcmcia: sa11xx_base: add units to the timing information
  pcmcia: sa11xx_base: fix reporting of timing information
  pcmcia: ds: fix suspend/resume
parents 22f6b4d3 1a57c286
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ static struct locomo_dev_info locomo_devices[] = {

static void locomo_handler(struct irq_desc *desc)
{
	struct locomo *lchip = irq_desc_get_chip_data(desc);
	struct locomo *lchip = irq_desc_get_handler_data(desc);
	int req, i;

	/* Acknowledge the parent IRQ */
@@ -200,8 +200,7 @@ static void locomo_setup_irq(struct locomo *lchip)
	 * Install handler for IRQ_LOCOMO_HW.
	 */
	irq_set_irq_type(lchip->irq, IRQ_TYPE_EDGE_FALLING);
	irq_set_chip_data(lchip->irq, lchip);
	irq_set_chained_handler(lchip->irq, locomo_handler);
	irq_set_chained_handler_and_data(lchip->irq, locomo_handler, lchip);

	/* Install handlers for IRQ_LOCOMO_* */
	for ( ; irq <= lchip->irq_base + 3; irq++) {
+19 −13
Original line number Diff line number Diff line
@@ -472,8 +472,8 @@ static int sa1111_setup_irq(struct sa1111 *sachip, unsigned irq_base)
	 * specifies that S0ReadyInt and S1ReadyInt should be '1'.
	 */
	sa1111_writel(0, irqbase + SA1111_INTPOL0);
	sa1111_writel(SA1111_IRQMASK_HI(IRQ_S0_READY_NINT) |
		      SA1111_IRQMASK_HI(IRQ_S1_READY_NINT),
	sa1111_writel(BIT(IRQ_S0_READY_NINT & 31) |
		      BIT(IRQ_S1_READY_NINT & 31),
		      irqbase + SA1111_INTPOL1);

	/* clear all IRQs */
@@ -754,7 +754,7 @@ static int __sa1111_probe(struct device *me, struct resource *mem, int irq)
	if (sachip->irq != NO_IRQ) {
		ret = sa1111_setup_irq(sachip, pd->irq_base);
		if (ret)
			goto err_unmap;
			goto err_clk;
	}

#ifdef CONFIG_ARCH_SA1100
@@ -799,6 +799,8 @@ static int __sa1111_probe(struct device *me, struct resource *mem, int irq)

	return 0;

 err_clk:
	clk_disable(sachip->clk);
 err_unmap:
	iounmap(sachip->base);
 err_clk_unprep:
@@ -869,9 +871,9 @@ struct sa1111_save_data {

#ifdef CONFIG_PM

static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
static int sa1111_suspend_noirq(struct device *dev)
{
	struct sa1111 *sachip = platform_get_drvdata(dev);
	struct sa1111 *sachip = dev_get_drvdata(dev);
	struct sa1111_save_data *save;
	unsigned long flags;
	unsigned int val;
@@ -934,9 +936,9 @@ static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
 *	restored by their respective drivers, and must be called
 *	via LDM after this function.
 */
static int sa1111_resume(struct platform_device *dev)
static int sa1111_resume_noirq(struct device *dev)
{
	struct sa1111 *sachip = platform_get_drvdata(dev);
	struct sa1111 *sachip = dev_get_drvdata(dev);
	struct sa1111_save_data *save;
	unsigned long flags, id;
	void __iomem *base;
@@ -952,7 +954,7 @@ static int sa1111_resume(struct platform_device *dev)
	id = sa1111_readl(sachip->base + SA1111_SKID);
	if ((id & SKID_ID_MASK) != SKID_SA1111_ID) {
		__sa1111_remove(sachip);
		platform_set_drvdata(dev, NULL);
		dev_set_drvdata(dev, NULL);
		kfree(save);
		return 0;
	}
@@ -1003,8 +1005,8 @@ static int sa1111_resume(struct platform_device *dev)
}

#else
#define sa1111_suspend NULL
#define sa1111_resume  NULL
#define sa1111_suspend_noirq NULL
#define sa1111_resume_noirq  NULL
#endif

static int sa1111_probe(struct platform_device *pdev)
@@ -1017,7 +1019,7 @@ static int sa1111_probe(struct platform_device *pdev)
		return -EINVAL;
	irq = platform_get_irq(pdev, 0);
	if (irq < 0)
		return -ENXIO;
		return irq;

	return __sa1111_probe(&pdev->dev, mem, irq);
}
@@ -1038,6 +1040,11 @@ static int sa1111_remove(struct platform_device *pdev)
	return 0;
}

static struct dev_pm_ops sa1111_pm_ops = {
	.suspend_noirq = sa1111_suspend_noirq,
	.resume_noirq = sa1111_resume_noirq,
};

/*
 *	Not sure if this should be on the system bus or not yet.
 *	We really want some way to register a system device at
@@ -1050,10 +1057,9 @@ static int sa1111_remove(struct platform_device *pdev)
static struct platform_driver sa1111_device_driver = {
	.probe		= sa1111_probe,
	.remove		= sa1111_remove,
	.suspend	= sa1111_suspend,
	.resume		= sa1111_resume,
	.driver		= {
		.name	= "sa1111",
		.pm	= &sa1111_pm_ops,
	},
};

+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
#define PMD_SECT_WB		(PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
#define PMD_SECT_MINICACHE	(PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE)
#define PMD_SECT_WBWA		(PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
#define PMD_SECT_CACHE_MASK	(PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
#define PMD_SECT_NONSHARED_DEV	(PMD_SECT_TEX(2))

/*
+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@
#define PMD_SECT_WT		(_AT(pmdval_t, 2) << 2)	/* normal inner write-through */
#define PMD_SECT_WB		(_AT(pmdval_t, 3) << 2)	/* normal inner write-back */
#define PMD_SECT_WBWA		(_AT(pmdval_t, 7) << 2)	/* normal inner write-alloc */
#define PMD_SECT_CACHE_MASK	(_AT(pmdval_t, 7) << 2)

/*
 * + Level 3 descriptor (PTE)
+14 −0
Original line number Diff line number Diff line
@@ -137,6 +137,18 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = {
	// no D+ pullup; lubbock can't connect/disconnect in software
};

static void lubbock_init_pcmcia(void)
{
	struct clk *clk;

	/* Add an alias for the SA1111 PCMCIA clock */
	clk = clk_get_sys("pxa2xx-pcmcia", NULL);
	if (!IS_ERR(clk)) {
		clkdev_create(clk, NULL, "1800");
		clk_put(clk);
	}
}

static struct resource sa1111_resources[] = {
	[0] = {
		.start	= 0x10000000,
@@ -467,6 +479,8 @@ static void __init lubbock_init(void)
	pxa_set_btuart_info(NULL);
	pxa_set_stuart_info(NULL);

	lubbock_init_pcmcia();

	clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL);
	pxa_set_udc_info(&udc_info);
	pxa_set_fb_info(NULL, &sharp_lm8v31);
Loading