mirror of
https://github.com/drasko/codezero.git
synced 2026-04-02 10:09:04 +02:00
Patch for comments by bahadir
This commit is contained in:
@@ -54,11 +54,10 @@ class configuration:
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Mapping between platform selected and gcc flags for it
|
# Mapping between platform selected and gcc flags for it
|
||||||
self.cpu_to_gcc_flag = (['PB926', 'arm926ej-s'],
|
self.cpu_to_gcc_flag = (['PB926', 'arm926ej-s'],
|
||||||
['CORTEXA8', 'cortex-a8'],
|
['PBA8', 'cortex-a8'],
|
||||||
['ARM11MPCORE', 'mpcore'],
|
['PB11MPCORE', 'mpcore'],
|
||||||
['CORTEXA9', 'cortex-a9'],
|
['PB1136', 'arm1136jf-s'],
|
||||||
['ARM1136', 'arm1136jf-s'],
|
['PB1176', 'arm1176jz-s'],)
|
||||||
['ARM1176', 'arm1176jz-s'],)
|
|
||||||
|
|
||||||
# Mapping between the processor architecture and toolchain
|
# Mapping between the processor architecture and toolchain
|
||||||
self.toolchain_kernel = (['ARM', 'arm-none-eabi-'],)
|
self.toolchain_kernel = (['ARM', 'arm-none-eabi-'],)
|
||||||
@@ -111,9 +110,9 @@ class configuration:
|
|||||||
if name[:len("CONFIG_PLATFORM_")] == "CONFIG_PLATFORM_":
|
if name[:len("CONFIG_PLATFORM_")] == "CONFIG_PLATFORM_":
|
||||||
parts = name.split("_", 3)
|
parts = name.split("_", 3)
|
||||||
self.platform = parts[2].lower()
|
self.platform = parts[2].lower()
|
||||||
for i in self.cpu_to_gcc_flag:
|
for cputype, cpuflag in self.cpu_to_gcc_flag:
|
||||||
if i[0] == parts[2]:
|
if parts[2] == cputype:
|
||||||
self.gcc_cpu_flag = i[1]
|
self.gcc_cpu_flag = cpuflag
|
||||||
|
|
||||||
# Extract cpu from a name value pair
|
# Extract cpu from a name value pair
|
||||||
def get_cpu(self, name, val):
|
def get_cpu(self, name, val):
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ sys.path.append(PROJRELROOT)
|
|||||||
from config.configuration import *
|
from config.configuration import *
|
||||||
from config.projpaths import *
|
from config.projpaths import *
|
||||||
|
|
||||||
Import('env', 'arch', 'platform')
|
Import('env', 'arch')
|
||||||
|
|
||||||
variant = 'userspace'
|
variant = 'userspace'
|
||||||
|
|
||||||
@@ -28,7 +28,6 @@ source = \
|
|||||||
Glob('src/*.c') + \
|
Glob('src/*.c') + \
|
||||||
Glob('src/sys-' + variant + '/*.c') + \
|
Glob('src/sys-' + variant + '/*.c') + \
|
||||||
Glob('src/sys-' + variant + '/arch-' + arch + '/*.c') + \
|
Glob('src/sys-' + variant + '/arch-' + arch + '/*.c') + \
|
||||||
Glob('src/sys-' + variant + '/arch-' + arch + '/plat-' + platform + '/*.c') + \
|
|
||||||
Glob('src/arch-' + arch + '/*.c') + \
|
Glob('src/arch-' + arch + '/*.c') + \
|
||||||
Glob('src/arch-' + arch + '/*.S') + \
|
Glob('src/arch-' + arch + '/*.S') + \
|
||||||
Glob('crt/sys-' + variant + '/arch-' + arch + '/*.[cS]')
|
Glob('crt/sys-' + variant + '/arch-' + arch + '/*.[cS]')
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
#define PL011_OEIRQ (1 << 10)
|
#define PL011_OEIRQ (1 << 10)
|
||||||
|
|
||||||
/* FIXME: Need to define this somewhere else */
|
/* FIXME: Need to define this somewhere else */
|
||||||
struct pl011_uart;
|
struct pl011_uart uart;
|
||||||
|
|
||||||
int pl011_initialise(struct pl011_uart *uart);
|
int pl011_initialise(struct pl011_uart *uart);
|
||||||
int pl011_tx_char(unsigned int base, char c);
|
int pl011_tx_char(unsigned int base, char c);
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
int __fputc(int c, FILE *stream);
|
extern int __fputc(int c, FILE *stream);
|
||||||
|
|
||||||
static int
|
static int ser_out(int c)
|
||||||
ser_out(int c)
|
|
||||||
{
|
{
|
||||||
__fputc(c, 0);
|
__fputc(c, 0);
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
|
|||||||
@@ -40,6 +40,9 @@
|
|||||||
#define PMD_ENTRY_TOTAL 256
|
#define PMD_ENTRY_TOTAL 256
|
||||||
#define PMD_MAP_SIZE SZ_1MB
|
#define PMD_MAP_SIZE SZ_1MB
|
||||||
|
|
||||||
|
/* We need this as printascii.S is including this file */
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/* Type-checkable page table elements */
|
/* Type-checkable page table elements */
|
||||||
typedef u32 pgd_t;
|
typedef u32 pgd_t;
|
||||||
typedef u32 pmd_t;
|
typedef u32 pmd_t;
|
||||||
@@ -157,4 +160,5 @@ void remove_section_mapping(unsigned long vaddr);
|
|||||||
void copy_pgds_by_vrange(pgd_table_t *to, pgd_table_t *from,
|
void copy_pgds_by_vrange(pgd_table_t *to, pgd_table_t *from,
|
||||||
unsigned long start, unsigned long end);
|
unsigned long start, unsigned long end);
|
||||||
|
|
||||||
|
#endif /* __ASSEMBLY__*/
|
||||||
#endif /* __V5_MM_H__ */
|
#endif /* __V5_MM_H__ */
|
||||||
|
|||||||
@@ -40,6 +40,9 @@
|
|||||||
#define PMD_ENTRY_TOTAL 256
|
#define PMD_ENTRY_TOTAL 256
|
||||||
#define PMD_MAP_SIZE SZ_1MB
|
#define PMD_MAP_SIZE SZ_1MB
|
||||||
|
|
||||||
|
/* We need this as printascii.S is including this file */
|
||||||
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
/* Type-checkable page table elements */
|
/* Type-checkable page table elements */
|
||||||
typedef u32 pgd_t;
|
typedef u32 pgd_t;
|
||||||
typedef u32 pmd_t;
|
typedef u32 pmd_t;
|
||||||
@@ -157,4 +160,5 @@ void remove_section_mapping(unsigned long vaddr);
|
|||||||
void copy_pgds_by_vrange(pgd_table_t *to, pgd_table_t *from,
|
void copy_pgds_by_vrange(pgd_table_t *to, pgd_table_t *from,
|
||||||
unsigned long start, unsigned long end);
|
unsigned long start, unsigned long end);
|
||||||
|
|
||||||
|
#endif /* __ASSEMBLY__*/
|
||||||
#endif /* __V5_MM_H__ */
|
#endif /* __V5_MM_H__ */
|
||||||
|
|||||||
@@ -11,25 +11,25 @@
|
|||||||
#include INC_PLAT(platform.h)
|
#include INC_PLAT(platform.h)
|
||||||
|
|
||||||
/* GIC CPU register offsets */
|
/* GIC CPU register offsets */
|
||||||
#define ARM_GIC_CPU_ICR 0x00 /* Interface Control */
|
#define ARM_GIC_CPU_IC 0x00 /* Interface Control */
|
||||||
#define ARM_GIC_CPUPMR 0x04 /* Interrupt Priority Mask */
|
#define ARM_GIC_CPUPM 0x04 /* Interrupt Priority Mask */
|
||||||
#define ARM_GIC_CPU_BPR 0x08 /* Binary Point */
|
#define ARM_GIC_CPU_BP 0x08 /* Binary Point */
|
||||||
#define ARM_GIC_CPU_IAR 0x0c /* Interrupt Acknowledge */
|
#define ARM_GIC_CPU_IA 0x0c /* Interrupt Acknowledge */
|
||||||
#define ARM_GIC_CPU_EOIR 0x10 /* End of Interrupt */
|
#define ARM_GIC_CPU_EOI 0x10 /* End of Interrupt */
|
||||||
#define ARM_GIC_CPU_RRI 0x14 /* Running Priority */
|
#define ARM_GIC_CPU_RPI 0x14 /* Running Priority */
|
||||||
#define ARM_GIC_CPU_HPIR 0x18 /* Highest Priority Interrupt*/
|
#define ARM_GIC_CPU_HPI 0x18 /* Highest Priority Interrupt*/
|
||||||
|
|
||||||
/* Distributor register map */
|
/* Distributor register map */
|
||||||
#define ARM_GIC_DIST_CR 0x000 /* Control Register */
|
#define ARM_GIC_DIST_CNTRL 0x000 /* Control Register */
|
||||||
#define ARM_GIC_DIST_ICTR 0x004 /* Interface Controller Type */
|
#define ARM_GIC_DIST_ICT 0x004 /* Interface Controller Type */
|
||||||
#define ARM_GIC_DIST_ISER 0x100 /* Interrupt Set Enable */
|
#define ARM_GIC_DIST_ISE 0x100 /* Interrupt Set Enable */
|
||||||
#define ARM_GIC_DIST_ICER 0x180 /* Interrupt Clear Enable */
|
#define ARM_GIC_DIST_ICE 0x180 /* Interrupt Clear Enable */
|
||||||
#define ARM_GIC_DIST_ISPR 0x200 /* Interrupt Set Pending */
|
#define ARM_GIC_DIST_ISP 0x200 /* Interrupt Set Pending */
|
||||||
#define ARM_GIC_DIST_ICPR 0x280 /* Interrupt Clear Pending*/
|
#define ARM_GIC_DIST_ICP 0x280 /* Interrupt Clear Pending*/
|
||||||
#define ARM_GIC_DIST_ABR 0x300 /* Active Bit */
|
#define ARM_GIC_DIST_AB 0x300 /* Active Bit */
|
||||||
#define ARM_GIC_DIST_IPR 0x400 /* Interrupt Priority */
|
#define ARM_GIC_DIST_IP 0x400 /* Interrupt Priority */
|
||||||
#define ARM_GIC_DIST_IPTR 0x800 /* Interrupt Processor Target */
|
#define ARM_GIC_DIST_IPT 0x800 /* Interrupt Processor Target */
|
||||||
#define ARM_GIC_DIST_ICR 0xc00 /* Interrupt Configuration */
|
#define ARM_GIC_DIST_IC 0xc00 /* Interrupt Configuration */
|
||||||
#define ARM_GIC_DIST_SGIR 0xf00 /* Software Generated Interrupt */
|
#define ARM_GIC_DIST_SGI 0xf00 /* Software Generated Interrupt */
|
||||||
|
|
||||||
#endif /* __ARM_GIC_H__ */
|
#endif /* __ARM_GIC_H__ */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef __PLATFORM_EB_PLATFORM_H__
|
#ifndef __EB_PLATFORM_H__
|
||||||
#define __PLATFORM_EB_PLATFORM_H__
|
#define __EB_PLATFORM_H__
|
||||||
/*
|
/*
|
||||||
* Platform specific ties between drivers and generic APIs used by the kernel.
|
* Platform specific ties between drivers and generic APIs used by the kernel.
|
||||||
* E.g. system timer and console.
|
* E.g. system timer and console.
|
||||||
@@ -25,4 +25,4 @@
|
|||||||
void platform_irq_enable(int irq);
|
void platform_irq_enable(int irq);
|
||||||
void platform_irq_disable(int irq);
|
void platform_irq_disable(int irq);
|
||||||
void timer_start(void);
|
void timer_start(void);
|
||||||
#endif /* __PLATFORM_EB_PLATFORM_H__ */
|
#endif /* __EB_PLATFORM_H__ */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef __PLATFORM_PB11MPCORE_PLATFORM_H__
|
#ifndef __PB11MPCORE_PLATFORM_H__
|
||||||
#define __PLATFORM_PB11MPCORE_PLATFORM_H__
|
#define __PB11MPCORE_PLATFORM_H__
|
||||||
/*
|
/*
|
||||||
* Platform specific ties between drivers and generic APIs used by the kernel.
|
* Platform specific ties between drivers and generic APIs used by the kernel.
|
||||||
* E.g. system timer and console.
|
* E.g. system timer and console.
|
||||||
@@ -22,13 +22,13 @@
|
|||||||
#define PLATFORM_TIMER1 1
|
#define PLATFORM_TIMER1 1
|
||||||
#define PLATFORM_TIMER2 2
|
#define PLATFORM_TIMER2 2
|
||||||
#define PLATFORM_TIMER3 3
|
#define PLATFORM_TIMER3 3
|
||||||
#define PLATFORM_TIMER3 4
|
#define PLATFORM_TIMER4 4
|
||||||
#define PLATFORM_TIMER3 5
|
#define PLATFORM_TIMER5 5
|
||||||
#define PLATFORM_TIMER3 6
|
#define PLATFORM_TIMER6 6
|
||||||
#define PLATFORM_TIMER3 7
|
#define PLATFORM_TIMER7 7
|
||||||
|
|
||||||
void platform_irq_enable(int irq);
|
void platform_irq_enable(int irq);
|
||||||
void platform_irq_disable(int irq);
|
void platform_irq_disable(int irq);
|
||||||
void timer_start(void);
|
void timer_start(void);
|
||||||
|
|
||||||
#endif /* __PLATFORM_PB11MPCORE_PLATFORM_H__ */
|
#endif /* __PB11MPCORE_PLATFORM_H__ */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef __PLATFORM_PB926_PLATFORM_H__
|
#ifndef __PB926_PLATFORM_H__
|
||||||
#define __PLATFORM_PB926_PLATFORM_H__
|
#define __PB926_PLATFORM_H__
|
||||||
/*
|
/*
|
||||||
* Platform specific ties between drivers and generic APIs used by the kernel.
|
* Platform specific ties between drivers and generic APIs used by the kernel.
|
||||||
* E.g. system timer and console.
|
* E.g. system timer and console.
|
||||||
@@ -30,4 +30,4 @@
|
|||||||
void platform_irq_enable(int irq);
|
void platform_irq_enable(int irq);
|
||||||
void platform_irq_disable(int irq);
|
void platform_irq_disable(int irq);
|
||||||
void timer_start(void);
|
void timer_start(void);
|
||||||
#endif /* __PLATFORM_PB926_PLATFORM_H__ */
|
#endif /* __PB926_PLATFORM_H__ */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef __PLATFORM_PBA8_PLATFORM_H__
|
#ifndef __PBA8_PLATFORM_H__
|
||||||
#define __PLATFORM_PBA8_PLATFORM_H__
|
#define __PBA8_PLATFORM_H__
|
||||||
/*
|
/*
|
||||||
* Platform specific ties between drivers and generic APIs used by the kernel.
|
* Platform specific ties between drivers and generic APIs used by the kernel.
|
||||||
* E.g. system timer and console.
|
* E.g. system timer and console.
|
||||||
@@ -21,12 +21,12 @@
|
|||||||
#define PLATFORM_TIMER1 1
|
#define PLATFORM_TIMER1 1
|
||||||
#define PLATFORM_TIMER2 2
|
#define PLATFORM_TIMER2 2
|
||||||
#define PLATFORM_TIMER3 3
|
#define PLATFORM_TIMER3 3
|
||||||
#define PLATFORM_TIMER3 4
|
#define PLATFORM_TIMER4 4
|
||||||
#define PLATFORM_TIMER3 5
|
#define PLATFORM_TIMER5 5
|
||||||
#define PLATFORM_TIMER3 6
|
#define PLATFORM_TIMER6 6
|
||||||
#define PLATFORM_TIMER3 7
|
#define PLATFORM_TIMER7 7
|
||||||
|
|
||||||
void platform_irq_enable(int irq);
|
void platform_irq_enable(int irq);
|
||||||
void platform_irq_disable(int irq);
|
void platform_irq_disable(int irq);
|
||||||
void timer_start(void);
|
void timer_start(void);
|
||||||
#endif /* __PLATFORM_PBA8_PLATFORM_H__ */
|
#endif /* __PBA8_PLATFORM_H__ */
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ variant = "baremetal"
|
|||||||
config = configuration_retrieve()
|
config = configuration_retrieve()
|
||||||
arch = config.arch
|
arch = config.arch
|
||||||
subarch = config.subarch
|
subarch = config.subarch
|
||||||
platform = config.platform
|
|
||||||
gcc_cpu_flag = config.gcc_cpu_flag
|
gcc_cpu_flag = config.gcc_cpu_flag
|
||||||
|
|
||||||
env = Environment(CC = config.kernel_toolchain + 'gcc',
|
env = Environment(CC = config.kernel_toolchain + 'gcc',
|
||||||
@@ -34,7 +33,6 @@ source = \
|
|||||||
Glob('src/*.c') + \
|
Glob('src/*.c') + \
|
||||||
Glob('src/sys-' + variant + '/*.c') + \
|
Glob('src/sys-' + variant + '/*.c') + \
|
||||||
Glob('src/sys-' + variant + '/arch-' + arch + '/*.c') + \
|
Glob('src/sys-' + variant + '/arch-' + arch + '/*.c') + \
|
||||||
Glob('src/sys-' + variant + '/arch-' + arch + '/plat-' + platform + '/*.c') + \
|
|
||||||
Glob('src/arch-' + arch + '/*.c') + \
|
Glob('src/arch-' + arch + '/*.c') + \
|
||||||
Glob('src/arch-' + arch + '/*.S') + \
|
Glob('src/arch-' + arch + '/*.S') + \
|
||||||
Glob('crt/sys-' + variant + '/arch-' + arch + '/*.[cS]')
|
Glob('crt/sys-' + variant + '/arch-' + arch + '/*.[cS]')
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
#define PL011_OEIRQ (1 << 10)
|
#define PL011_OEIRQ (1 << 10)
|
||||||
|
|
||||||
/* FIXME: Need to define this somewhere else */
|
/* FIXME: Need to define this somewhere else */
|
||||||
struct pl011_uart;
|
struct pl011_uart uart;
|
||||||
|
|
||||||
int pl011_initialise(struct pl011_uart *uart);
|
int pl011_initialise(struct pl011_uart *uart);
|
||||||
int pl011_tx_char(unsigned int base, char c);
|
int pl011_tx_char(unsigned int base, char c);
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
int __fputc(int c, FILE *stream);
|
extern int __fputc(int c, FILE *stream);
|
||||||
|
|
||||||
static int
|
static int ser_out(int c)
|
||||||
ser_out(int c)
|
|
||||||
{
|
{
|
||||||
__fputc(c, 0);
|
__fputc(c, 0);
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ class LinuxUpdateKernel:
|
|||||||
self.archid_list = (['PB926', '0x183'],
|
self.archid_list = (['PB926', '0x183'],
|
||||||
['AB926', '0x25E'],
|
['AB926', '0x25E'],
|
||||||
['PB1176', '0x5E0'],
|
['PB1176', '0x5E0'],
|
||||||
['REALVIEW_EB', '33B'],)
|
['PBA8', '0x769'],
|
||||||
|
['EB', '0x33B'],
|
||||||
|
['PB11MPCORE', '0x3D4'],)
|
||||||
|
|
||||||
# Replace line(having input_pattern) in filename with new_data
|
# Replace line(having input_pattern) in filename with new_data
|
||||||
def replace_line(self, filename, input_pattern, new_data, prev_line):
|
def replace_line(self, filename, input_pattern, new_data, prev_line):
|
||||||
@@ -119,13 +121,13 @@ class LinuxUpdateKernel:
|
|||||||
|
|
||||||
# TODO: This call needs to be made global
|
# TODO: This call needs to be made global
|
||||||
config = configuration_retrieve()
|
config = configuration_retrieve()
|
||||||
for i in self.cpuid_list:
|
for cpu_type, cpu_id in self.cpuid_list:
|
||||||
if i[0] == config.cpu.upper():
|
if cpu_type == config.cpu.upper():
|
||||||
cpuid = i[1]
|
cpuid = cpu_id
|
||||||
break
|
break
|
||||||
for i in self.archid_list:
|
for arch_type, arch_id in self.archid_list:
|
||||||
if i[0] == config.platform.upper():
|
if arch_type == config.platform.upper():
|
||||||
archid = i[1]
|
archid = arch_id
|
||||||
break
|
break
|
||||||
|
|
||||||
file = join(LINUX_KERNELDIR, 'arch/arm/kernel/head.S')
|
file = join(LINUX_KERNELDIR, 'arch/arm/kernel/head.S')
|
||||||
@@ -145,10 +147,10 @@ class LinuxUpdateKernel:
|
|||||||
|
|
||||||
def modify_kernel_config(self):
|
def modify_kernel_config(self):
|
||||||
file = join(LINUX_KERNELDIR, 'arch/arm/configs/versatile_defconfig')
|
file = join(LINUX_KERNELDIR, 'arch/arm/configs/versatile_defconfig')
|
||||||
for i in self.config_param_list:
|
for param_name, param_value in self.config_param_list:
|
||||||
param = 'CONFIG_' + i[0]
|
param = 'CONFIG_' + param_name
|
||||||
prev_line = ''
|
prev_line = ''
|
||||||
if i[1] == 'SET':
|
if param_value == 'SET':
|
||||||
data_to_replace = ('# ' + param)
|
data_to_replace = ('# ' + param)
|
||||||
new_data = (param + '=y' + '\n')
|
new_data = (param + '=y' + '\n')
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
((setclr) ? setbit(bitvect, (base + reg)) \
|
((setclr) ? setbit(bitvect, (base + reg)) \
|
||||||
: clrbit(bitvect, (base + reg)))
|
: clrbit(bitvect, (base + reg)))
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* Returns the irq number on this chip converting the irq bitvector */
|
/* Returns the irq number on this chip converting the irq bitvector */
|
||||||
int pl190_read_irq(void)
|
int pl190_read_irq(void)
|
||||||
{
|
{
|
||||||
@@ -102,3 +103,4 @@ void pl190_sic_init(void)
|
|||||||
write(0xFFFFFFFF, PL190_SIC_PICENCLR);
|
write(0xFFFFFFFF, PL190_SIC_PICENCLR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
#include <l4/drivers/irq/pl190/pl190_vic.h>
|
#include <l4/drivers/irq/pl190/pl190_vic.h>
|
||||||
#include <l4/drivers/timer/sp804/sp804_timer.h>
|
#include <l4/drivers/timer/sp804/sp804_timer.h>
|
||||||
|
|
||||||
|
struct irq_chip irq_chip_array[IRQ_CHIPS_MAX];
|
||||||
|
#if 0
|
||||||
struct irq_chip irq_chip_array[IRQ_CHIPS_MAX] = {
|
struct irq_chip irq_chip_array[IRQ_CHIPS_MAX] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.name = "Vectored irq controller",
|
.name = "Vectored irq controller",
|
||||||
@@ -38,6 +40,7 @@ struct irq_chip irq_chip_array[IRQ_CHIPS_MAX] = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static int platform_timer_handler(void)
|
static int platform_timer_handler(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ void init_platform_timer(void)
|
|||||||
{
|
{
|
||||||
add_boot_mapping(EB_TIMER01_BASE, PLATFORM_TIMER0_BASE, PAGE_SIZE,
|
add_boot_mapping(EB_TIMER01_BASE, PLATFORM_TIMER0_BASE, PAGE_SIZE,
|
||||||
MAP_IO_DEFAULT_FLAGS);
|
MAP_IO_DEFAULT_FLAGS);
|
||||||
add_boot_mapping(EB_SYSCTRL_BASE, PB926_SYSCTRL_VBASE, PAGE_SIZE,
|
add_boot_mapping(EB_SYSCTRL_BASE, EB_SYSCTRL_VBASE, PAGE_SIZE,
|
||||||
MAP_IO_DEFAULT_FLAGS);
|
MAP_IO_DEFAULT_FLAGS);
|
||||||
timer_init();
|
timer_init();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,6 @@
|
|||||||
|
|
||||||
#define UART_DATA_OFFSET 0x0
|
#define UART_DATA_OFFSET 0x0
|
||||||
|
|
||||||
/*
|
|
||||||
* FIXME: We need to divide into bytes as writing to register doesnot look
|
|
||||||
* possible directly, it gives some errors in compilation
|
|
||||||
*/
|
|
||||||
#define UART0_PHYS_BASE EB_UART0_BASE
|
#define UART0_PHYS_BASE EB_UART0_BASE
|
||||||
#define UART0_PHYS_BYTE1 (UART0_PHYS_BASE & 0xFF000000)
|
#define UART0_PHYS_BYTE1 (UART0_PHYS_BASE & 0xFF000000)
|
||||||
#define UART0_PHYS_BYTE2 (UART0_PHYS_BASE & 0x00FF0000)
|
#define UART0_PHYS_BYTE2 (UART0_PHYS_BASE & 0x00FF0000)
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
#include <l4/drivers/irq/pl190/pl190_vic.h>
|
#include <l4/drivers/irq/pl190/pl190_vic.h>
|
||||||
#include <l4/drivers/timer/sp804/sp804_timer.h>
|
#include <l4/drivers/timer/sp804/sp804_timer.h>
|
||||||
|
|
||||||
|
struct irq_chip irq_chip_array[IRQ_CHIPS_MAX];
|
||||||
|
#if 0
|
||||||
struct irq_chip irq_chip_array[IRQ_CHIPS_MAX] = {
|
struct irq_chip irq_chip_array[IRQ_CHIPS_MAX] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.name = "Vectored irq controller",
|
.name = "Vectored irq controller",
|
||||||
@@ -38,6 +40,7 @@ struct irq_chip irq_chip_array[IRQ_CHIPS_MAX] = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static int platform_timer_handler(void)
|
static int platform_timer_handler(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ void init_platform_console(void)
|
|||||||
* userspace printf can work. Note, this raw mapping is to be
|
* userspace printf can work. Note, this raw mapping is to be
|
||||||
* removed in the future, when file-based io is implemented.
|
* removed in the future, when file-based io is implemented.
|
||||||
*/
|
*/
|
||||||
add_boot_mapping(PBMPCORE_UART0_BASE, USERSPACE_UART_BASE, PAGE_SIZE,
|
add_boot_mapping(PB11MPCORE_UART0_BASE, USERSPACE_UART_BASE, PAGE_SIZE,
|
||||||
MAP_USR_IO_FLAGS);
|
MAP_USR_IO_FLAGS);
|
||||||
|
|
||||||
uart_init();
|
uart_init();
|
||||||
@@ -37,11 +37,13 @@ void init_platform_console(void)
|
|||||||
|
|
||||||
void init_platform_timer(void)
|
void init_platform_timer(void)
|
||||||
{
|
{
|
||||||
add_boot_mapping(PBMPCORE_TIMER01_BASE, PLATFORM_TIMER0_BASE, PAGE_SIZE,
|
add_boot_mapping(PB11MPCORE_TIMER01_BASE, PLATFORM_TIMER0_BASE, PAGE_SIZE,
|
||||||
MAP_IO_DEFAULT_FLAGS);
|
MAP_IO_DEFAULT_FLAGS);
|
||||||
add_boot_mapping(PB926_SYSCTRL_BASE, PB926_SYSCTRL0_VBASE, PAGE_SIZE,
|
add_boot_mapping(PB11MPCORE_SYSCTRL0_BASE, PB11MPCORE_SYSCTRL0_VBASE, PAGE_SIZE,
|
||||||
MAP_IO_DEFAULT_FLAGS);
|
MAP_IO_DEFAULT_FLAGS);
|
||||||
/* TODO: SYSCTRL1 mapping may be needed */
|
/* TODO: SYSCTRL1 mapping may be needed */
|
||||||
|
add_boot_mapping(PB11MPCORE_SYSCTRL1_BASE, PB11MPCORE_SYSCTRL1_VBASE, PAGE_SIZE,
|
||||||
|
MAP_IO_DEFAULT_FLAGS);
|
||||||
timer_init();
|
timer_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,6 @@
|
|||||||
|
|
||||||
#define UART_DATA_OFFSET 0x0
|
#define UART_DATA_OFFSET 0x0
|
||||||
|
|
||||||
/*
|
|
||||||
* FIXME: We need to divide into bytes as writing to register doesnot look
|
|
||||||
* possible directly, it gives some errors in compilation
|
|
||||||
*/
|
|
||||||
#define UART0_PHYS_BASE PB11MPCORE_UART0_BASE
|
#define UART0_PHYS_BASE PB11MPCORE_UART0_BASE
|
||||||
#define UART0_PHYS_BYTE1 (UART0_PHYS_BASE & 0xFF000000)
|
#define UART0_PHYS_BYTE1 (UART0_PHYS_BASE & 0xFF000000)
|
||||||
#define UART0_PHYS_BYTE2 (UART0_PHYS_BASE & 0x00FF0000)
|
#define UART0_PHYS_BYTE2 (UART0_PHYS_BASE & 0x00FF0000)
|
||||||
|
|||||||
@@ -8,10 +8,6 @@
|
|||||||
|
|
||||||
#define UART_DATA_OFFSET 0x0
|
#define UART_DATA_OFFSET 0x0
|
||||||
|
|
||||||
/*
|
|
||||||
* FIXME: We need to divide into bytes as writing to register doesnot look
|
|
||||||
* possible directly, it gives some errors in compilation
|
|
||||||
*/
|
|
||||||
#define UART0_PHYS_BASE PB926_UART0_BASE
|
#define UART0_PHYS_BASE PB926_UART0_BASE
|
||||||
#define UART0_PHYS_BYTE1 (UART0_PHYS_BASE & 0xFF000000)
|
#define UART0_PHYS_BYTE1 (UART0_PHYS_BASE & 0xFF000000)
|
||||||
#define UART0_PHYS_BYTE2 (UART0_PHYS_BASE & 0x00FF0000)
|
#define UART0_PHYS_BYTE2 (UART0_PHYS_BASE & 0x00FF0000)
|
||||||
|
|||||||
@@ -12,6 +12,9 @@
|
|||||||
#include <l4/drivers/irq/pl190/pl190_vic.h>
|
#include <l4/drivers/irq/pl190/pl190_vic.h>
|
||||||
#include <l4/drivers/timer/sp804/sp804_timer.h>
|
#include <l4/drivers/timer/sp804/sp804_timer.h>
|
||||||
|
|
||||||
|
|
||||||
|
struct irq_chip irq_chip_array[IRQ_CHIPS_MAX];
|
||||||
|
#if 0
|
||||||
struct irq_chip irq_chip_array[IRQ_CHIPS_MAX] = {
|
struct irq_chip irq_chip_array[IRQ_CHIPS_MAX] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.name = "Vectored irq controller",
|
.name = "Vectored irq controller",
|
||||||
@@ -38,6 +41,7 @@ struct irq_chip irq_chip_array[IRQ_CHIPS_MAX] = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static int platform_timer_handler(void)
|
static int platform_timer_handler(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,9 +39,11 @@ void init_platform_timer(void)
|
|||||||
{
|
{
|
||||||
add_boot_mapping(PBA8_TIMER01_BASE, PLATFORM_TIMER0_BASE, PAGE_SIZE,
|
add_boot_mapping(PBA8_TIMER01_BASE, PLATFORM_TIMER0_BASE, PAGE_SIZE,
|
||||||
MAP_IO_DEFAULT_FLAGS);
|
MAP_IO_DEFAULT_FLAGS);
|
||||||
add_boot_mapping(PBA8_SYSCTRL_BASE, PB926_SYSCTRL0_VBASE, PAGE_SIZE,
|
add_boot_mapping(PBA8_SYSCTRL0_BASE, PBA8_SYSCTRL0_VBASE, PAGE_SIZE,
|
||||||
MAP_IO_DEFAULT_FLAGS);
|
MAP_IO_DEFAULT_FLAGS);
|
||||||
/* TODO: May need mapping for SYSCTRL1 */
|
/* TODO: May need mapping for SYSCTRL1 */
|
||||||
|
add_boot_mapping(PBA8_SYSCTRL1_BASE, PBA8_SYSCTRL1_VBASE, PAGE_SIZE,
|
||||||
|
MAP_IO_DEFAULT_FLAGS);
|
||||||
timer_init();
|
timer_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,6 @@
|
|||||||
|
|
||||||
#define UART_DATA_OFFSET 0x0
|
#define UART_DATA_OFFSET 0x0
|
||||||
|
|
||||||
/*
|
|
||||||
* FIXME: We need to divide into bytes as writing to register doesnot look
|
|
||||||
* possible directly, it gives some errors in compilation
|
|
||||||
*/
|
|
||||||
#define UART0_PHYS_BASE PBA8_UART0_BASE
|
#define UART0_PHYS_BASE PBA8_UART0_BASE
|
||||||
#define UART0_PHYS_BYTE1 (UART0_PHYS_BASE & 0xFF000000)
|
#define UART0_PHYS_BYTE1 (UART0_PHYS_BASE & 0xFF000000)
|
||||||
#define UART0_PHYS_BYTE2 (UART0_PHYS_BASE & 0x00FF0000)
|
#define UART0_PHYS_BYTE2 (UART0_PHYS_BASE & 0x00FF0000)
|
||||||
|
|||||||
Reference in New Issue
Block a user