AT91 drivers for 5.11:
- add sam9x60 SiP IDs - at91_cf cleanups -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEycoQi/giopmpPgB12wIijOdRNOUFAl/Bby0ACgkQ2wIijOdR NOVIqg//V9kwHeOvONb8f3WgwYuF3HU0t2kO8RLRrN8YxisSkdAZSzYQVylCAu4Q XNtARbAfAvACumQb6ul4QQqOu1W4sfxlfTpW2pOI1wLiF6FV64cDz6cS+CWD+V3Q jSwXVgIgl3N8YyMBvw2/du1/WknEj7oo7xsZ772tmGf64cnGabg073tO5fkHCN9p kTxcMy85YR4Xj4C9SG9CWKILOf0FxdlFRu3ErASL6I09Vtb5gHvL7IgDGOWWghoL 1JUDi9cSUIP1jWO703/itCat540aC9D+y7nutH64bkMlilfTRtnZ8iYDX0M6rIzf XlhN257qAmV8w3aeKneLD+ys9MK5SuLPAVZo0mTiLpmBrJcQ4cFmE3tRifeGV63G 95AZbYp2PFoOHFp0vm6GHdOok9mFJzJwnUH4i8rs8dqPKmqKvTtgyxexQRgcDvWy vg9SPJ5AHt8HdGJb28ue47/Oq/9XpS6hKsGQSpKs+Nj/TkUpQvK1jZtnTF37HFOe NnGX1PHYy2sjEf6gTWZzEk4rG/zyrlafs7gbh5m/yCxBNLTnF7N/0dOFtoldRHlD v9Y6xktUFigwB/74AISXMTlcQN7gQKO5n1dZcCVbHKjO6tQDabbDsfa0FXYl2A3E 0FyqtgvrvdA4AR4ZXpcYcD18UBQ8yFHjAJFB6tBFE2A6k4IgIpI= =IuFY -----END PGP SIGNATURE----- Merge tag 'at91-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/drivers AT91 drivers for 5.11: - add sam9x60 SiP IDs - at91_cf cleanups * tag 'at91-drivers-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: pcmcia: at91_cf: remove platform data support pcmcia: at91_cf: move definitions locally ARM: at91: sam9x60 SiP types added to soc description Link: https://lore.kernel.org/r/20201127214140.GA1688544@piout.net Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
c6241fd5de
|
@ -258,6 +258,7 @@ config OMAP_CF
|
|||
config AT91_CF
|
||||
tristate "AT91 CompactFlash Controller"
|
||||
depends on PCI
|
||||
depends on OF
|
||||
depends on PCMCIA && ARCH_AT91
|
||||
help
|
||||
Say Y here to support the CompactFlash controller on AT91 chips.
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <linux/interrupt.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/platform_data/atmel.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/sizes.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
|
@ -35,6 +34,17 @@
|
|||
#define CF_IO_PHYS (1 << 23)
|
||||
#define CF_MEM_PHYS (0x017ff800)
|
||||
|
||||
struct at91_cf_data {
|
||||
int irq_pin; /* I/O IRQ */
|
||||
int det_pin; /* Card detect */
|
||||
int vcc_pin; /* power switching */
|
||||
int rst_pin; /* card reset */
|
||||
u8 chipselect; /* EBI Chip Select number */
|
||||
u8 flags;
|
||||
#define AT91_CF_TRUE_IDE 0x01
|
||||
#define AT91_IDE_SWAP_A0_A2 0x02
|
||||
};
|
||||
|
||||
struct regmap *mc;
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
@ -209,16 +219,18 @@ static struct pccard_operations at91_cf_ops = {
|
|||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#if defined(CONFIG_OF)
|
||||
static const struct of_device_id at91_cf_dt_ids[] = {
|
||||
{ .compatible = "atmel,at91rm9200-cf" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, at91_cf_dt_ids);
|
||||
|
||||
static int at91_cf_dt_init(struct platform_device *pdev)
|
||||
static int at91_cf_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct at91_cf_data *board;
|
||||
struct at91_cf_socket *cf;
|
||||
struct at91_cf_data *board;
|
||||
struct resource *io;
|
||||
int status;
|
||||
|
||||
board = devm_kzalloc(&pdev->dev, sizeof(*board), GFP_KERNEL);
|
||||
if (!board)
|
||||
|
@ -229,33 +241,9 @@ static int at91_cf_dt_init(struct platform_device *pdev)
|
|||
board->vcc_pin = of_get_gpio(pdev->dev.of_node, 2);
|
||||
board->rst_pin = of_get_gpio(pdev->dev.of_node, 3);
|
||||
|
||||
pdev->dev.platform_data = board;
|
||||
|
||||
mc = syscon_regmap_lookup_by_compatible("atmel,at91rm9200-sdramc");
|
||||
|
||||
return PTR_ERR_OR_ZERO(mc);
|
||||
}
|
||||
#else
|
||||
static int at91_cf_dt_init(struct platform_device *pdev)
|
||||
{
|
||||
return -ENODEV;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int at91_cf_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct at91_cf_socket *cf;
|
||||
struct at91_cf_data *board = pdev->dev.platform_data;
|
||||
struct resource *io;
|
||||
int status;
|
||||
|
||||
if (!board) {
|
||||
status = at91_cf_dt_init(pdev);
|
||||
if (status)
|
||||
return status;
|
||||
|
||||
board = pdev->dev.platform_data;
|
||||
}
|
||||
if (IS_ERR(mc))
|
||||
return PTR_ERR(mc);
|
||||
|
||||
if (!gpio_is_valid(board->det_pin) || !gpio_is_valid(board->rst_pin))
|
||||
return -ENODEV;
|
||||
|
@ -399,7 +387,7 @@ static int at91_cf_resume(struct platform_device *pdev)
|
|||
static struct platform_driver at91_cf_driver = {
|
||||
.driver = {
|
||||
.name = "at91_cf",
|
||||
.of_match_table = of_match_ptr(at91_cf_dt_ids),
|
||||
.of_match_table = at91_cf_dt_ids,
|
||||
},
|
||||
.probe = at91_cf_probe,
|
||||
.remove = at91_cf_remove,
|
||||
|
|
|
@ -69,6 +69,12 @@ static const struct at91_soc __initconst socs[] = {
|
|||
#endif
|
||||
#ifdef CONFIG_SOC_SAM9X60
|
||||
AT91_SOC(SAM9X60_CIDR_MATCH, SAM9X60_EXID_MATCH, "sam9x60", "sam9x60"),
|
||||
AT91_SOC(SAM9X60_CIDR_MATCH, SAM9X60_D5M_EXID_MATCH,
|
||||
"sam9x60 64MiB DDR2 SiP", "sam9x60"),
|
||||
AT91_SOC(SAM9X60_CIDR_MATCH, SAM9X60_D1G_EXID_MATCH,
|
||||
"sam9x60 128MiB DDR2 SiP", "sam9x60"),
|
||||
AT91_SOC(SAM9X60_CIDR_MATCH, SAM9X60_D6K_EXID_MATCH,
|
||||
"sam9x60 8MiB SDRAM SiP", "sam9x60"),
|
||||
#endif
|
||||
#ifdef CONFIG_SOC_SAMA5
|
||||
AT91_SOC(SAMA5D2_CIDR_MATCH, SAMA5D21CU_EXID_MATCH,
|
||||
|
|
|
@ -60,6 +60,9 @@ at91_soc_init(const struct at91_soc *socs);
|
|||
#define AT91SAM9CN11_EXID_MATCH 0x00000009
|
||||
|
||||
#define SAM9X60_EXID_MATCH 0x00000000
|
||||
#define SAM9X60_D5M_EXID_MATCH 0x00000001
|
||||
#define SAM9X60_D1G_EXID_MATCH 0x00000010
|
||||
#define SAM9X60_D6K_EXID_MATCH 0x00000011
|
||||
|
||||
#define AT91SAM9XE128_CIDR_MATCH 0x329973a0
|
||||
#define AT91SAM9XE256_CIDR_MATCH 0x329a93a0
|
||||
|
|
|
@ -6,18 +6,6 @@
|
|||
#ifndef __ATMEL_H__
|
||||
#define __ATMEL_H__
|
||||
|
||||
/* Compact Flash */
|
||||
struct at91_cf_data {
|
||||
int irq_pin; /* I/O IRQ */
|
||||
int det_pin; /* Card detect */
|
||||
int vcc_pin; /* power switching */
|
||||
int rst_pin; /* card reset */
|
||||
u8 chipselect; /* EBI Chip Select number */
|
||||
u8 flags;
|
||||
#define AT91_CF_TRUE_IDE 0x01
|
||||
#define AT91_IDE_SWAP_A0_A2 0x02
|
||||
};
|
||||
|
||||
/* FIXME: this needs a better location, but gets stuff building again */
|
||||
#ifdef CONFIG_ATMEL_PM
|
||||
extern int at91_suspend_entering_slow_clock(void);
|
||||
|
|
Loading…
Reference in New Issue