mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-01 17:10:42 +09:00
AT91: fix related arch-at91 header files
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
This commit is contained in:
parent
405e5919f2
commit
83f1072e06
@ -28,11 +28,10 @@
|
|||||||
void at91_can_hw_init(void);
|
void at91_can_hw_init(void);
|
||||||
void at91_macb_hw_init(void);
|
void at91_macb_hw_init(void);
|
||||||
void at91_mci_hw_init(void);
|
void at91_mci_hw_init(void);
|
||||||
void at91_serial_hw_init(void);
|
|
||||||
void at91_serial0_hw_init(void);
|
void at91_serial0_hw_init(void);
|
||||||
void at91_serial1_hw_init(void);
|
void at91_serial1_hw_init(void);
|
||||||
void at91_serial2_hw_init(void);
|
void at91_serial2_hw_init(void);
|
||||||
void at91_serial3_hw_init(void);
|
void at91_seriald_hw_init(void);
|
||||||
void at91_spi0_hw_init(unsigned long cs_mask);
|
void at91_spi0_hw_init(unsigned long cs_mask);
|
||||||
void at91_spi1_hw_init(unsigned long cs_mask);
|
void at91_spi1_hw_init(unsigned long cs_mask);
|
||||||
void at91_uhp_hw_init(void);
|
void at91_uhp_hw_init(void);
|
||||||
|
@ -76,32 +76,19 @@ typedef struct at91_port {
|
|||||||
u32 reserved6[85];
|
u32 reserved6[85];
|
||||||
} at91_port_t;
|
} at91_port_t;
|
||||||
|
|
||||||
#if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9261) || \
|
|
||||||
defined(CONFIG_AT91SAM9G10) || defined(CONFIG_AT91SAM9G20)
|
|
||||||
#define AT91_PIO_PORTS 3
|
|
||||||
#elif defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G45) || \
|
|
||||||
defined(CONFIG_AT91SAM9M10G45)
|
|
||||||
#define AT91_PIO_PORTS 5
|
|
||||||
#elif defined(CONFIG_AT91RM9200) || defined(CONFIG_AT91CAP9) || \
|
|
||||||
defined(CONFIG_AT91SAM9RL)
|
|
||||||
#define AT91_PIO_PORTS 4
|
|
||||||
#else
|
|
||||||
#error "Unsupported cpu. Please update at91_pio.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef union at91_pio {
|
typedef union at91_pio {
|
||||||
struct {
|
struct {
|
||||||
at91_port_t pioa;
|
at91_port_t pioa;
|
||||||
at91_port_t piob;
|
at91_port_t piob;
|
||||||
at91_port_t pioc;
|
at91_port_t pioc;
|
||||||
#if (AT91_PIO_PORTS > 3)
|
#if (ATMEL_PIO_PORTS > 3)
|
||||||
at91_port_t piod;
|
at91_port_t piod;
|
||||||
#endif
|
#endif
|
||||||
#if (AT91_PIO_PORTS > 4)
|
#if (ATMEL_PIO_PORTS > 4)
|
||||||
at91_port_t pioe;
|
at91_port_t pioe;
|
||||||
#endif
|
#endif
|
||||||
} ;
|
} ;
|
||||||
at91_port_t port[AT91_PIO_PORTS];
|
at91_port_t port[ATMEL_PIO_PORTS];
|
||||||
} at91_pio_t;
|
} at91_pio_t;
|
||||||
|
|
||||||
#ifdef CONFIG_AT91_GPIO
|
#ifdef CONFIG_AT91_GPIO
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include <asm/arch/at91_pio.h>
|
#include <asm/arch/at91_pio.h>
|
||||||
#include <asm/arch/hardware.h>
|
#include <asm/arch/hardware.h>
|
||||||
|
|
||||||
#ifdef CONFIG_AT91_LEGACY
|
#ifdef CONFIG_ATMEL_LEGACY
|
||||||
|
|
||||||
#define PIN_BASE 32
|
#define PIN_BASE 32
|
||||||
|
|
||||||
@ -192,13 +192,13 @@
|
|||||||
#define AT91_PIN_PE31 (PIN_BASE + 0x80 + 31)
|
#define AT91_PIN_PE31 (PIN_BASE + 0x80 + 31)
|
||||||
|
|
||||||
static unsigned long at91_pios[] = {
|
static unsigned long at91_pios[] = {
|
||||||
AT91_PIOA,
|
ATMEL_BASE_PIOA,
|
||||||
AT91_PIOB,
|
ATMEL_BASE_PIOB,
|
||||||
AT91_PIOC,
|
ATMEL_BASE_PIOC,
|
||||||
#ifdef AT91_PIOD
|
#ifdef ATMEL_BASE_PIOD
|
||||||
AT91_PIOD,
|
ATMEL_BASE_PIOD,
|
||||||
#ifdef AT91_PIOE
|
#ifdef ATMEL_BASE_PIOE
|
||||||
AT91_PIOE
|
ATMEL_BASE_PIOE
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@ -207,7 +207,7 @@ static inline void *pin_to_controller(unsigned pin)
|
|||||||
{
|
{
|
||||||
pin -= PIN_BASE;
|
pin -= PIN_BASE;
|
||||||
pin /= 32;
|
pin /= 32;
|
||||||
return (void *)(AT91_BASE_SYS + at91_pios[pin]);
|
return (void *)(at91_pios[pin]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned pin_to_mask(unsigned pin)
|
static inline unsigned pin_to_mask(unsigned pin)
|
||||||
|
@ -27,14 +27,14 @@
|
|||||||
|
|
||||||
static inline unsigned int at91_sys_read(unsigned int reg_offset)
|
static inline unsigned int at91_sys_read(unsigned int reg_offset)
|
||||||
{
|
{
|
||||||
void *addr = (void *)AT91_BASE_SYS;
|
void *addr = (void *)ATMEL_BASE_SYS;
|
||||||
|
|
||||||
return __raw_readl(addr + reg_offset);
|
return __raw_readl(addr + reg_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void at91_sys_write(unsigned int reg_offset, unsigned long value)
|
static inline void at91_sys_write(unsigned int reg_offset, unsigned long value)
|
||||||
{
|
{
|
||||||
void *addr = (void *)AT91_BASE_SYS;
|
void *addr = (void *)ATMEL_BASE_SYS;
|
||||||
|
|
||||||
__raw_writel(value, addr + reg_offset);
|
__raw_writel(value, addr + reg_offset);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user