浏览代码

Merge tag 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes

Here is another fixes series for AT91 designed for 3.4-rc.

We experienced some issues while compiling some drivers as modules: Joachim has
corrected several of them. We may reduce this number of exported values by
reworking some drivers, in the future.

Some drivers are also modified here, I would like to keep them in the series
as the modifications are really related with our recent move to irqdomains or
simply related with compiler annotations.

I keep dmaengine Kconfig modification in this "fixes" series. The DMA
driver will not be available for 9x5 SoC family otherwise.

* tag 'at91-fixes' of git://github.com/at91linux/linux-at91:
  dmaengine: Kconfig: fix Atmel at_hdmac entry
  USB: gadget/at91_udc: add gpio_to_irq() function to vbus interrupt
  USB: ohci-at91: change annotations for probe/remove functions
  leds-atmel-pwm.c: Make pwmled_probe() __devinit
  ARM: at91: fix at91sam9261ek Ethernet dm9000 irq
  ARM: at91: fix rm9200ek flash size
  ARM: at91: remove empty at91_init_serial function
  ARM: at91: fix typo in at91_pmc_base assembly declaration
  ARM: at91: Export at91_matrix_base
  ARM: at91: Export at91_pmc_base
  ARM: at91: Export at91_ramc_base
  ARM: at91: Export at91_st_base
Olof Johansson 13 年之前
父节点
当前提交
6842d4c2a9

+ 0 - 1
arch/arm/mach-at91/at91rm9200_devices.c

@@ -1173,7 +1173,6 @@ void __init at91_add_device_serial(void)
 		printk(KERN_INFO "AT91: No default serial console defined.\n");
 		printk(KERN_INFO "AT91: No default serial console defined.\n");
 }
 }
 #else
 #else
-void __init __deprecated at91_init_serial(struct at91_uart_config *config) {}
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
 void __init at91_set_serial_console(unsigned portnr) {}
 void __init at91_set_serial_console(unsigned portnr) {}
 void __init at91_add_device_serial(void) {}
 void __init at91_add_device_serial(void) {}

+ 2 - 0
arch/arm/mach-at91/at91rm9200_time.c

@@ -23,6 +23,7 @@
 #include <linux/interrupt.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/irq.h>
 #include <linux/clockchips.h>
 #include <linux/clockchips.h>
+#include <linux/export.h>
 
 
 #include <asm/mach/time.h>
 #include <asm/mach/time.h>
 
 
@@ -176,6 +177,7 @@ static struct clock_event_device clkevt = {
 };
 };
 
 
 void __iomem *at91_st_base;
 void __iomem *at91_st_base;
+EXPORT_SYMBOL_GPL(at91_st_base);
 
 
 void __init at91rm9200_ioremap_st(u32 addr)
 void __init at91rm9200_ioremap_st(u32 addr)
 {
 {

+ 1 - 1
arch/arm/mach-at91/board-rm9200ek.c

@@ -117,7 +117,7 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = {
 };
 };
 
 
 #define EK_FLASH_BASE	AT91_CHIPSELECT_0
 #define EK_FLASH_BASE	AT91_CHIPSELECT_0
-#define EK_FLASH_SIZE	SZ_2M
+#define EK_FLASH_SIZE	SZ_8M
 
 
 static struct physmap_flash_data ek_flash_data = {
 static struct physmap_flash_data ek_flash_data = {
 	.width		= 2,
 	.width		= 2,

+ 3 - 2
arch/arm/mach-at91/board-sam9261ek.c

@@ -85,8 +85,6 @@ static struct resource dm9000_resource[] = {
 		.flags	= IORESOURCE_MEM
 		.flags	= IORESOURCE_MEM
 	},
 	},
 	[2] = {
 	[2] = {
-		.start	= AT91_PIN_PC11,
-		.end	= AT91_PIN_PC11,
 		.flags	= IORESOURCE_IRQ
 		.flags	= IORESOURCE_IRQ
 			| IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE,
 			| IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE,
 	}
 	}
@@ -130,6 +128,8 @@ static struct sam9_smc_config __initdata dm9000_smc_config = {
 
 
 static void __init ek_add_device_dm9000(void)
 static void __init ek_add_device_dm9000(void)
 {
 {
+	struct resource *r = &dm9000_resource[2];
+
 	/* Configure chip-select 2 (DM9000) */
 	/* Configure chip-select 2 (DM9000) */
 	sam9_smc_configure(0, 2, &dm9000_smc_config);
 	sam9_smc_configure(0, 2, &dm9000_smc_config);
 
 
@@ -139,6 +139,7 @@ static void __init ek_add_device_dm9000(void)
 	/* Configure Interrupt pin as input, no pull-up */
 	/* Configure Interrupt pin as input, no pull-up */
 	at91_set_gpio_input(AT91_PIN_PC11, 0);
 	at91_set_gpio_input(AT91_PIN_PC11, 0);
 
 
+	r->start = r->end = gpio_to_irq(AT91_PIN_PC11);
 	platform_device_register(&dm9000_device);
 	platform_device_register(&dm9000_device);
 }
 }
 #else
 #else

+ 1 - 0
arch/arm/mach-at91/clock.c

@@ -35,6 +35,7 @@
 #include "generic.h"
 #include "generic.h"
 
 
 void __iomem *at91_pmc_base;
 void __iomem *at91_pmc_base;
+EXPORT_SYMBOL_GPL(at91_pmc_base);
 
 
 /*
 /*
  * There's a lot more which can be done with clocks, including cpufreq
  * There's a lot more which can be done with clocks, including cpufreq

+ 1 - 1
arch/arm/mach-at91/include/mach/at91_pmc.h

@@ -25,7 +25,7 @@ extern void __iomem *at91_pmc_base;
 #define at91_pmc_write(field, value) \
 #define at91_pmc_write(field, value) \
 	__raw_writel(value, at91_pmc_base + field)
 	__raw_writel(value, at91_pmc_base + field)
 #else
 #else
-.extern at91_aic_base
+.extern at91_pmc_base
 #endif
 #endif
 
 
 #define	AT91_PMC_SCER		0x00			/* System Clock Enable Register */
 #define	AT91_PMC_SCER		0x00			/* System Clock Enable Register */

+ 2 - 0
arch/arm/mach-at91/setup.c

@@ -54,6 +54,7 @@ void __init at91_init_interrupts(unsigned int *priority)
 }
 }
 
 
 void __iomem *at91_ramc_base[2];
 void __iomem *at91_ramc_base[2];
+EXPORT_SYMBOL_GPL(at91_ramc_base);
 
 
 void __init at91_ioremap_ramc(int id, u32 addr, u32 size)
 void __init at91_ioremap_ramc(int id, u32 addr, u32 size)
 {
 {
@@ -292,6 +293,7 @@ void __init at91_ioremap_rstc(u32 base_addr)
 }
 }
 
 
 void __iomem *at91_matrix_base;
 void __iomem *at91_matrix_base;
+EXPORT_SYMBOL_GPL(at91_matrix_base);
 
 
 void __init at91_ioremap_matrix(u32 base_addr)
 void __init at91_ioremap_matrix(u32 base_addr)
 {
 {

+ 2 - 3
drivers/dma/Kconfig

@@ -91,11 +91,10 @@ config DW_DMAC
 
 
 config AT_HDMAC
 config AT_HDMAC
 	tristate "Atmel AHB DMA support"
 	tristate "Atmel AHB DMA support"
-	depends on ARCH_AT91SAM9RL || ARCH_AT91SAM9G45
+	depends on ARCH_AT91
 	select DMA_ENGINE
 	select DMA_ENGINE
 	help
 	help
-	  Support the Atmel AHB DMA controller.  This can be integrated in
-	  chips such as the Atmel AT91SAM9RL.
+	  Support the Atmel AHB DMA controller.
 
 
 config FSL_DMA
 config FSL_DMA
 	tristate "Freescale Elo and Elo Plus DMA support"
 	tristate "Freescale Elo and Elo Plus DMA support"

+ 1 - 1
drivers/leds/leds-atmel-pwm.c

@@ -35,7 +35,7 @@ static void pwmled_brightness(struct led_classdev *cdev, enum led_brightness b)
  * NOTE:  we reuse the platform_data structure of GPIO leds,
  * NOTE:  we reuse the platform_data structure of GPIO leds,
  * but repurpose its "gpio" number as a PWM channel number.
  * but repurpose its "gpio" number as a PWM channel number.
  */
  */
-static int __init pwmled_probe(struct platform_device *pdev)
+static int __devinit pwmled_probe(struct platform_device *pdev)
 {
 {
 	const struct gpio_led_platform_data	*pdata;
 	const struct gpio_led_platform_data	*pdata;
 	struct pwmled				*leds;
 	struct pwmled				*leds;

+ 4 - 4
drivers/usb/gadget/at91_udc.c

@@ -1863,8 +1863,8 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
 			mod_timer(&udc->vbus_timer,
 			mod_timer(&udc->vbus_timer,
 				  jiffies + VBUS_POLL_TIMEOUT);
 				  jiffies + VBUS_POLL_TIMEOUT);
 		} else {
 		} else {
-			if (request_irq(udc->board.vbus_pin, at91_vbus_irq,
-					0, driver_name, udc)) {
+			if (request_irq(gpio_to_irq(udc->board.vbus_pin),
+					at91_vbus_irq, 0, driver_name, udc)) {
 				DBG("request vbus irq %d failed\n",
 				DBG("request vbus irq %d failed\n",
 				    udc->board.vbus_pin);
 				    udc->board.vbus_pin);
 				retval = -EBUSY;
 				retval = -EBUSY;
@@ -1886,7 +1886,7 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
 	return 0;
 	return 0;
 fail4:
 fail4:
 	if (gpio_is_valid(udc->board.vbus_pin) && !udc->board.vbus_polled)
 	if (gpio_is_valid(udc->board.vbus_pin) && !udc->board.vbus_polled)
-		free_irq(udc->board.vbus_pin, udc);
+		free_irq(gpio_to_irq(udc->board.vbus_pin), udc);
 fail3:
 fail3:
 	if (gpio_is_valid(udc->board.vbus_pin))
 	if (gpio_is_valid(udc->board.vbus_pin))
 		gpio_free(udc->board.vbus_pin);
 		gpio_free(udc->board.vbus_pin);
@@ -1924,7 +1924,7 @@ static int __exit at91udc_remove(struct platform_device *pdev)
 	device_init_wakeup(&pdev->dev, 0);
 	device_init_wakeup(&pdev->dev, 0);
 	remove_debug_file(udc);
 	remove_debug_file(udc);
 	if (gpio_is_valid(udc->board.vbus_pin)) {
 	if (gpio_is_valid(udc->board.vbus_pin)) {
-		free_irq(udc->board.vbus_pin, udc);
+		free_irq(gpio_to_irq(udc->board.vbus_pin), udc);
 		gpio_free(udc->board.vbus_pin);
 		gpio_free(udc->board.vbus_pin);
 	}
 	}
 	free_irq(udc->udp_irq, udc);
 	free_irq(udc->udp_irq, udc);

+ 6 - 6
drivers/usb/host/ohci-at91.c

@@ -94,7 +94,7 @@ static void at91_stop_hc(struct platform_device *pdev)
 
 
 /*-------------------------------------------------------------------------*/
 /*-------------------------------------------------------------------------*/
 
 
-static void usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *);
+static void __devexit usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *);
 
 
 /* configure so an HC device and id are always provided */
 /* configure so an HC device and id are always provided */
 /* always called with process context; sleeping is OK */
 /* always called with process context; sleeping is OK */
@@ -108,7 +108,7 @@ static void usb_hcd_at91_remove (struct usb_hcd *, struct platform_device *);
  * then invokes the start() method for the HCD associated with it
  * then invokes the start() method for the HCD associated with it
  * through the hotplug entry's driver_data.
  * through the hotplug entry's driver_data.
  */
  */
-static int usb_hcd_at91_probe(const struct hc_driver *driver,
+static int __devinit usb_hcd_at91_probe(const struct hc_driver *driver,
 			struct platform_device *pdev)
 			struct platform_device *pdev)
 {
 {
 	int retval;
 	int retval;
@@ -203,7 +203,7 @@ static int usb_hcd_at91_probe(const struct hc_driver *driver,
  * context, "rmmod" or something similar.
  * context, "rmmod" or something similar.
  *
  *
  */
  */
-static void usb_hcd_at91_remove(struct usb_hcd *hcd,
+static void __devexit usb_hcd_at91_remove(struct usb_hcd *hcd,
 				struct platform_device *pdev)
 				struct platform_device *pdev)
 {
 {
 	usb_remove_hcd(hcd);
 	usb_remove_hcd(hcd);
@@ -545,7 +545,7 @@ static int __devinit ohci_at91_of_init(struct platform_device *pdev)
 
 
 /*-------------------------------------------------------------------------*/
 /*-------------------------------------------------------------------------*/
 
 
-static int ohci_hcd_at91_drv_probe(struct platform_device *pdev)
+static int __devinit ohci_hcd_at91_drv_probe(struct platform_device *pdev)
 {
 {
 	struct at91_usbh_data	*pdata;
 	struct at91_usbh_data	*pdata;
 	int			i;
 	int			i;
@@ -620,7 +620,7 @@ static int ohci_hcd_at91_drv_probe(struct platform_device *pdev)
 	return usb_hcd_at91_probe(&ohci_at91_hc_driver, pdev);
 	return usb_hcd_at91_probe(&ohci_at91_hc_driver, pdev);
 }
 }
 
 
-static int ohci_hcd_at91_drv_remove(struct platform_device *pdev)
+static int __devexit ohci_hcd_at91_drv_remove(struct platform_device *pdev)
 {
 {
 	struct at91_usbh_data	*pdata = pdev->dev.platform_data;
 	struct at91_usbh_data	*pdata = pdev->dev.platform_data;
 	int			i;
 	int			i;
@@ -696,7 +696,7 @@ MODULE_ALIAS("platform:at91_ohci");
 
 
 static struct platform_driver ohci_hcd_at91_driver = {
 static struct platform_driver ohci_hcd_at91_driver = {
 	.probe		= ohci_hcd_at91_drv_probe,
 	.probe		= ohci_hcd_at91_drv_probe,
-	.remove		= ohci_hcd_at91_drv_remove,
+	.remove		= __devexit_p(ohci_hcd_at91_drv_remove),
 	.shutdown	= usb_hcd_platform_shutdown,
 	.shutdown	= usb_hcd_platform_shutdown,
 	.suspend	= ohci_hcd_at91_drv_suspend,
 	.suspend	= ohci_hcd_at91_drv_suspend,
 	.resume		= ohci_hcd_at91_drv_resume,
 	.resume		= ohci_hcd_at91_drv_resume,