M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
#ifndef __ASM_MACH_CLKDEV_H
#define __ASM_MACH_CLKDEV_H
#include <plat/clock.h>
struct clk {
const struct clk_ops *ops;
unsigned long rate;
const struct icst_params *params;
};
#define __clk_get(clk) ({ 1; })
#define __clk_put(clk) do { } while (0)
#endif

View File

@@ -0,0 +1,47 @@
#ifndef __MACH_CT_CA9X4_H
#define __MACH_CT_CA9X4_H
/*
* Physical base addresses
*/
#define CT_CA9X4_CLCDC (0x10020000)
#define CT_CA9X4_AXIRAM (0x10060000)
#define CT_CA9X4_DMC (0x100e0000)
#define CT_CA9X4_SMC (0x100e1000)
#define CT_CA9X4_SCC (0x100e2000)
#define CT_CA9X4_SP804_TIMER (0x100e4000)
#define CT_CA9X4_SP805_WDT (0x100e5000)
#define CT_CA9X4_TZPC (0x100e6000)
#define CT_CA9X4_GPIO (0x100e8000)
#define CT_CA9X4_FASTAXI (0x100e9000)
#define CT_CA9X4_SLOWAXI (0x100ea000)
#define CT_CA9X4_TZASC (0x100ec000)
#define CT_CA9X4_CORESIGHT (0x10200000)
#define CT_CA9X4_MPIC (0x1e000000)
#define CT_CA9X4_SYSTIMER (0x1e004000)
#define CT_CA9X4_SYSWDT (0x1e007000)
#define CT_CA9X4_L2CC (0x1e00a000)
#define A9_MPCORE_SCU (CT_CA9X4_MPIC + 0x0000)
#define A9_MPCORE_GIC_CPU (CT_CA9X4_MPIC + 0x0100)
#define A9_MPCORE_GIT (CT_CA9X4_MPIC + 0x0200)
#define A9_MPCORE_TWD (CT_CA9X4_MPIC + 0x0600)
#define A9_MPCORE_GIC_DIST (CT_CA9X4_MPIC + 0x1000)
/*
* Interrupts. Those in {} are for AMBA devices
*/
#define IRQ_CT_CA9X4_CLCDC { 76 }
#define IRQ_CT_CA9X4_DMC { 0 }
#define IRQ_CT_CA9X4_SMC { 77, 78 }
#define IRQ_CT_CA9X4_TIMER0 80
#define IRQ_CT_CA9X4_TIMER1 81
#define IRQ_CT_CA9X4_GPIO { 82 }
#define IRQ_CT_CA9X4_PMU_CPU0 92
#define IRQ_CT_CA9X4_PMU_CPU1 93
#define IRQ_CT_CA9X4_PMU_CPU2 94
#define IRQ_CT_CA9X4_PMU_CPU3 95
extern struct ct_desc ct_ca9x4_desc;
#endif

View File

@@ -0,0 +1,43 @@
/* arch/arm/mach-realview/include/mach/debug-macro.S
*
* Debugging macro include header
*
* Copyright (C) 1994-1999 Russell King
* Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#define DEBUG_LL_PHYS_BASE 0x10000000
#define DEBUG_LL_UART_OFFSET 0x00009000
#define DEBUG_LL_PHYS_BASE_RS1 0x1c000000
#define DEBUG_LL_UART_OFFSET_RS1 0x00090000
#define DEBUG_LL_VIRT_BASE 0xf8000000
.macro addruart,rp,rv,tmp
@ Make an educated guess regarding the memory map:
@ - the original A9 core tile, which has MPCore peripherals
@ located at 0x1e000000, should use UART at 0x10009000
@ - all other (RS1 complaint) tiles use UART mapped
@ at 0x1c090000
mrc p15, 4, \tmp, c15, c0, 0
cmp \tmp, #0x1e000000
@ Original memory map
moveq \rp, #DEBUG_LL_UART_OFFSET
orreq \rv, \rp, #DEBUG_LL_VIRT_BASE
orreq \rp, \rp, #DEBUG_LL_PHYS_BASE
@ RS1 memory map
movne \rp, #DEBUG_LL_UART_OFFSET_RS1
orrne \rv, \rp, #DEBUG_LL_VIRT_BASE
orrne \rp, \rp, #DEBUG_LL_PHYS_BASE_RS1
.endm
#include <asm/hardware/debug-pl01x.S>

View File

@@ -0,0 +1 @@
/* empty */

View File

@@ -0,0 +1 @@
/* empty */

View File

@@ -0,0 +1,4 @@
#define IRQ_LOCALTIMER 29
#define IRQ_LOCALWDOG 30
#define NR_IRQS 256

View File

@@ -0,0 +1,147 @@
#ifndef __MACH_MOTHERBOARD_H
#define __MACH_MOTHERBOARD_H
/*
* Physical addresses, offset from V2M_PA_CS0-3
*/
#define V2M_NOR0 (V2M_PA_CS0)
#define V2M_NOR1 (V2M_PA_CS1)
#define V2M_SRAM (V2M_PA_CS2)
#define V2M_VIDEO_SRAM (V2M_PA_CS3 + 0x00000000)
#define V2M_LAN9118 (V2M_PA_CS3 + 0x02000000)
#define V2M_ISP1761 (V2M_PA_CS3 + 0x03000000)
/*
* Physical addresses, offset from V2M_PA_CS7
*/
#define V2M_SYSREGS (V2M_PA_CS7 + 0x00000000)
#define V2M_SYSCTL (V2M_PA_CS7 + 0x00001000)
#define V2M_SERIAL_BUS_PCI (V2M_PA_CS7 + 0x00002000)
#define V2M_AACI (V2M_PA_CS7 + 0x00004000)
#define V2M_MMCI (V2M_PA_CS7 + 0x00005000)
#define V2M_KMI0 (V2M_PA_CS7 + 0x00006000)
#define V2M_KMI1 (V2M_PA_CS7 + 0x00007000)
#define V2M_UART0 (V2M_PA_CS7 + 0x00009000)
#define V2M_UART1 (V2M_PA_CS7 + 0x0000a000)
#define V2M_UART2 (V2M_PA_CS7 + 0x0000b000)
#define V2M_UART3 (V2M_PA_CS7 + 0x0000c000)
#define V2M_WDT (V2M_PA_CS7 + 0x0000f000)
#define V2M_TIMER01 (V2M_PA_CS7 + 0x00011000)
#define V2M_TIMER23 (V2M_PA_CS7 + 0x00012000)
#define V2M_SERIAL_BUS_DVI (V2M_PA_CS7 + 0x00016000)
#define V2M_RTC (V2M_PA_CS7 + 0x00017000)
#define V2M_CF (V2M_PA_CS7 + 0x0001a000)
#define V2M_CLCD (V2M_PA_CS7 + 0x0001f000)
/*
* Offsets from SYSREGS base
*/
#define V2M_SYS_ID 0x000
#define V2M_SYS_SW 0x004
#define V2M_SYS_LED 0x008
#define V2M_SYS_100HZ 0x024
#define V2M_SYS_FLAGS 0x030
#define V2M_SYS_FLAGSSET 0x030
#define V2M_SYS_FLAGSCLR 0x034
#define V2M_SYS_NVFLAGS 0x038
#define V2M_SYS_NVFLAGSSET 0x038
#define V2M_SYS_NVFLAGSCLR 0x03c
#define V2M_SYS_MCI 0x048
#define V2M_SYS_FLASH 0x03c
#define V2M_SYS_CFGSW 0x058
#define V2M_SYS_24MHZ 0x05c
#define V2M_SYS_MISC 0x060
#define V2M_SYS_DMA 0x064
#define V2M_SYS_PROCID0 0x084
#define V2M_SYS_PROCID1 0x088
#define V2M_SYS_CFGDATA 0x0a0
#define V2M_SYS_CFGCTRL 0x0a4
#define V2M_SYS_CFGSTAT 0x0a8
/*
* Interrupts. Those in {} are for AMBA devices
*/
#define IRQ_V2M_WDT { (32 + 0) }
#define IRQ_V2M_TIMER0 (32 + 2)
#define IRQ_V2M_TIMER1 (32 + 2)
#define IRQ_V2M_TIMER2 (32 + 3)
#define IRQ_V2M_TIMER3 (32 + 3)
#define IRQ_V2M_RTC { (32 + 4) }
#define IRQ_V2M_UART0 { (32 + 5) }
#define IRQ_V2M_UART1 { (32 + 6) }
#define IRQ_V2M_UART2 { (32 + 7) }
#define IRQ_V2M_UART3 { (32 + 8) }
#define IRQ_V2M_MMCI { (32 + 9), (32 + 10) }
#define IRQ_V2M_AACI { (32 + 11) }
#define IRQ_V2M_KMI0 { (32 + 12) }
#define IRQ_V2M_KMI1 { (32 + 13) }
#define IRQ_V2M_CLCD { (32 + 14) }
#define IRQ_V2M_LAN9118 (32 + 15)
#define IRQ_V2M_ISP1761 (32 + 16)
#define IRQ_V2M_PCIE (32 + 17)
/*
* Configuration
*/
#define SYS_CFG_START (1 << 31)
#define SYS_CFG_WRITE (1 << 30)
#define SYS_CFG_OSC (1 << 20)
#define SYS_CFG_VOLT (2 << 20)
#define SYS_CFG_AMP (3 << 20)
#define SYS_CFG_TEMP (4 << 20)
#define SYS_CFG_RESET (5 << 20)
#define SYS_CFG_SCC (6 << 20)
#define SYS_CFG_MUXFPGA (7 << 20)
#define SYS_CFG_SHUTDOWN (8 << 20)
#define SYS_CFG_REBOOT (9 << 20)
#define SYS_CFG_DVIMODE (11 << 20)
#define SYS_CFG_POWER (12 << 20)
#define SYS_CFG_SITE_MB (0 << 16)
#define SYS_CFG_SITE_DB1 (1 << 16)
#define SYS_CFG_SITE_DB2 (2 << 16)
#define SYS_CFG_STACK(n) ((n) << 12)
#define SYS_CFG_ERR (1 << 1)
#define SYS_CFG_COMPLETE (1 << 0)
int v2m_cfg_write(u32 devfn, u32 data);
int v2m_cfg_read(u32 devfn, u32 *data);
void v2m_flags_set(u32 data);
/*
* Miscellaneous
*/
#define SYS_MISC_MASTERSITE (1 << 14)
#define SYS_PROCIDx_HBI_MASK 0xfff
/*
* Core tile IDs
*/
#define V2M_CT_ID_CA9 0x0c000191
#define V2M_CT_ID_UNSUPPORTED 0xff000191
#define V2M_CT_ID_MASK 0xff000fff
struct ct_desc {
u32 id;
const char *name;
void (*map_io)(void);
void (*init_early)(void);
void (*init_irq)(void);
void (*init_tile)(void);
#ifdef CONFIG_SMP
void (*init_cpu_map)(void);
void (*smp_enable)(unsigned int);
#endif
};
extern struct ct_desc *ct_desc;
#endif

View File

@@ -0,0 +1,23 @@
/*
* arch/arm/mach-vexpress/include/mach/timex.h
*
* RealView architecture timex specifications
*
* Copyright (C) 2003 ARM Limited
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define CLOCK_TICK_RATE (50000000 / 16)

View File

@@ -0,0 +1,72 @@
/*
* arch/arm/mach-vexpress/include/mach/uncompress.h
*
* Copyright (C) 2003 ARM Limited
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00))
#define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c))
#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30))
#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18))
#define UART_BASE 0x10009000
#define UART_BASE_RS1 0x1c090000
static unsigned long get_uart_base(void)
{
unsigned long mpcore_periph;
/*
* Make an educated guess regarding the memory map:
* - the original A9 core tile, which has MPCore peripherals
* located at 0x1e000000, should use UART at 0x10009000
* - all other (RS1 complaint) tiles use UART mapped
* at 0x1c090000
*/
asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (mpcore_periph));
if (mpcore_periph == 0x1e000000)
return UART_BASE;
else
return UART_BASE_RS1;
}
/*
* This does not append a newline
*/
static inline void putc(int c)
{
unsigned long base = get_uart_base();
while (AMBA_UART_FR(base) & (1 << 5))
barrier();
AMBA_UART_DR(base) = c;
}
static inline void flush(void)
{
unsigned long base = get_uart_base();
while (AMBA_UART_FR(base) & (1 << 3))
barrier();
}
/*
* nothing to do
*/
#define arch_decomp_setup()
#define arch_decomp_wdog()