--- zzzz-none-000/linux-4.9.218/arch/mips/include/asm/mach-lantiq/lantiq.h 2020-04-02 15:20:41.000000000 +0000 +++ seale-7590ac-750/linux-4.9.218/arch/mips/include/asm/mach-lantiq/lantiq.h 2022-11-30 09:46:19.000000000 +0000 @@ -15,41 +15,45 @@ /* generic reg access functions */ #define ltq_r32(reg) __raw_readl(reg) #define ltq_w32(val, reg) __raw_writel(val, reg) + #define ltq_w32_mask(clear, set, reg) \ ltq_w32((ltq_r32(reg) & ~(clear)) | (set), reg) + +#define ltq_r16(reg) __raw_readw(reg) +#define ltq_w16(val, reg) __raw_writew(val, reg) + #define ltq_r8(reg) __raw_readb(reg) #define ltq_w8(val, reg) __raw_writeb(val, reg) -/* register access macros for EBU and CGU */ -#define ltq_ebu_w32(x, y) ltq_w32((x), ltq_ebu_membase + (y)) -#define ltq_ebu_r32(x) ltq_r32(ltq_ebu_membase + (x)) -#define ltq_ebu_w32_mask(x, y, z) \ - ltq_w32_mask(x, y, ltq_ebu_membase + (z)) -extern __iomem void *ltq_ebu_membase; - /* spinlock all ebu i/o */ extern spinlock_t ebu_lock; /* some irq helpers */ -extern void ltq_disable_irq(struct irq_data *data); -extern void ltq_mask_and_ack_irq(struct irq_data *data); -extern void ltq_enable_irq(struct irq_data *data); -extern int ltq_eiu_get_irq(int exin); +void ltq_disable_irq(struct irq_data *data); +void ltq_mask_and_ack_irq(struct irq_data *data); +void ltq_enable_irq(struct irq_data *data); +int ltq_eiu_get_irq(int exin); /* clock handling */ -extern int clk_activate(struct clk *clk); -extern void clk_deactivate(struct clk *clk); -extern struct clk *clk_get_cpu(void); -extern struct clk *clk_get_fpi(void); -extern struct clk *clk_get_io(void); -extern struct clk *clk_get_ppe(void); +int clk_activate(struct clk *clk); +void clk_deactivate(struct clk *clk); +struct clk *clk_get_cpu(void); +struct clk *clk_get_ddr(void); +struct clk *clk_get_fpi(void); +struct clk *clk_get_io(void); +struct clk *clk_get_ppe(void); +struct clk *clk_get_xbar(void); /* find out what bootsource we have */ -extern unsigned char ltq_boot_select(void); +unsigned char ltq_boot_select(void); /* find out what caused the last cpu reset */ -extern int ltq_reset_cause(void); -/* find out the soc type */ -extern int ltq_soc_type(void); +int ltq_reset_cause(void); +void ltq_reset_once(unsigned int module, ulong u); +void ltq_hw_reset(unsigned int module); +void ltq_rst_init(void); +unsigned int ltq_get_cpu_id(void); +unsigned int ltq_get_soc_type(void); +unsigned int ltq_get_soc_rev(void); #define IOPORT_RESOURCE_START 0x10000000 #define IOPORT_RESOURCE_END 0xffffffff