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

Commit a5368e77 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

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

* 'at91-fixes' of git://github.com/at91linux/linux-at91:
  ARM: at91: drop ide driver in favor of the pata one
  pata/at91: use newly introduced SMC accessors
  ARM: at91: add accessor to manage SMC
  ARM: at91:rtc/rtc-at91sam9: ioremap register bank
  ARM: at91: USB AT91 gadget registration for module
parents 88fa269b cf844751
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -83,7 +83,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
 *  USB Device (Gadget)
 *  USB Device (Gadget)
 * -------------------------------------------------------------------- */
 * -------------------------------------------------------------------- */


#ifdef CONFIG_USB_AT91
#if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE)
static struct at91_udc_data udc_data;
static struct at91_udc_data udc_data;


static struct resource udc_resources[] = {
static struct resource udc_resources[] = {
+3 −6
Original line number Original line Diff line number Diff line
@@ -84,7 +84,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
 *  USB Device (Gadget)
 *  USB Device (Gadget)
 * -------------------------------------------------------------------- */
 * -------------------------------------------------------------------- */


#ifdef CONFIG_USB_AT91
#if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE)
static struct at91_udc_data udc_data;
static struct at91_udc_data udc_data;


static struct resource udc_resources[] = {
static struct resource udc_resources[] = {
@@ -1215,8 +1215,7 @@ void __init at91_add_device_serial(void) {}
 *  CF/IDE
 *  CF/IDE
 * -------------------------------------------------------------------- */
 * -------------------------------------------------------------------- */


#if defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE) || \
#if defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) || \
	defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) || \
	defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE)
	defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE)


static struct at91_cf_data cf0_data;
static struct at91_cf_data cf0_data;
@@ -1313,10 +1312,8 @@ void __init at91_add_device_cf(struct at91_cf_data *data)
	if (data->flags & AT91_CF_TRUE_IDE)
	if (data->flags & AT91_CF_TRUE_IDE)
#if defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE)
#if defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE)
		pdev->name = "pata_at91";
		pdev->name = "pata_at91";
#elif defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE)
		pdev->name = "at91_ide";
#else
#else
#warning "board requires AT91_CF_TRUE_IDE: enable either at91_ide or pata_at91"
#warning "board requires AT91_CF_TRUE_IDE: enable pata_at91"
#endif
#endif
	else
	else
		pdev->name = "at91_cf";
		pdev->name = "at91_cf";
+1 −1
Original line number Original line Diff line number Diff line
@@ -87,7 +87,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
 *  USB Device (Gadget)
 *  USB Device (Gadget)
 * -------------------------------------------------------------------- */
 * -------------------------------------------------------------------- */


#ifdef CONFIG_USB_AT91
#if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE)
static struct at91_udc_data udc_data;
static struct at91_udc_data udc_data;


static struct resource udc_resources[] = {
static struct resource udc_resources[] = {
+4 −4
Original line number Original line Diff line number Diff line
@@ -92,7 +92,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
 *  USB Device (Gadget)
 *  USB Device (Gadget)
 * -------------------------------------------------------------------- */
 * -------------------------------------------------------------------- */


#ifdef CONFIG_USB_AT91
#if defined(CONFIG_USB_AT91) || defined(CONFIG_USB_AT91_MODULE)
static struct at91_udc_data udc_data;
static struct at91_udc_data udc_data;


static struct resource udc_resources[] = {
static struct resource udc_resources[] = {
@@ -355,8 +355,8 @@ void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
 *  Compact Flash (PCMCIA or IDE)
 *  Compact Flash (PCMCIA or IDE)
 * -------------------------------------------------------------------- */
 * -------------------------------------------------------------------- */


#if defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE) || \
#if defined(CONFIG_PATA_AT91) || defined(CONFIG_PATA_AT91_MODULE) || \
    defined(CONFIG_BLK_DEV_IDE_AT91) || defined(CONFIG_BLK_DEV_IDE_AT91_MODULE)
	defined(CONFIG_AT91_CF) || defined(CONFIG_AT91_CF_MODULE)


static struct at91_cf_data cf0_data;
static struct at91_cf_data cf0_data;


@@ -450,7 +450,7 @@ void __init at91_add_device_cf(struct at91_cf_data *data)
	at91_set_A_periph(AT91_PIN_PD9, 0);  /* CFCE2 */
	at91_set_A_periph(AT91_PIN_PD9, 0);  /* CFCE2 */
	at91_set_A_periph(AT91_PIN_PD14, 0); /* CFNRW */
	at91_set_A_periph(AT91_PIN_PD14, 0); /* CFNRW */


	pdev->name = (data->flags & AT91_CF_TRUE_IDE) ? "at91_ide" : "at91_cf";
	pdev->name = (data->flags & AT91_CF_TRUE_IDE) ? "pata_at91" : "at91_cf";
	platform_device_register(pdev);
	platform_device_register(pdev);
}
}
#else
#else
+29 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,35 @@


#include <mach/cpu.h>
#include <mach/cpu.h>


#ifndef __ASSEMBLY__
struct sam9_smc_config {
	/* Setup register */
	u8 ncs_read_setup;
	u8 nrd_setup;
	u8 ncs_write_setup;
	u8 nwe_setup;

	/* Pulse register */
	u8 ncs_read_pulse;
	u8 nrd_pulse;
	u8 ncs_write_pulse;
	u8 nwe_pulse;

	/* Cycle register */
	u16 read_cycle;
	u16 write_cycle;

	/* Mode register */
	u32 mode;
	u8 tdf_cycles:4;
};

extern void sam9_smc_configure(int id, int cs, struct sam9_smc_config *config);
extern void sam9_smc_read(int id, int cs, struct sam9_smc_config *config);
extern void sam9_smc_read_mode(int id, int cs, struct sam9_smc_config *config);
extern void sam9_smc_write_mode(int id, int cs, struct sam9_smc_config *config);
#endif

#define AT91_SMC_SETUP		0x00				/* Setup Register for CS n */
#define AT91_SMC_SETUP		0x00				/* Setup Register for CS n */
#define		AT91_SMC_NWESETUP	(0x3f << 0)			/* NWE Setup Length */
#define		AT91_SMC_NWESETUP	(0x3f << 0)			/* NWE Setup Length */
#define			AT91_SMC_NWESETUP_(x)	((x) << 0)
#define			AT91_SMC_NWESETUP_(x)	((x) << 0)
Loading