mirror of
https://github.com/drasko/codezero.git
synced 2026-03-15 08:41:50 +01:00
Timer devices removed, based on PAGE granularity mappings.
This commit is contained in:
@@ -220,23 +220,17 @@ symbols
|
|||||||
cont%(cn)d_device_uart1 'Container %(cn)d UART1 Menu'
|
cont%(cn)d_device_uart1 'Container %(cn)d UART1 Menu'
|
||||||
cont%(cn)d_device_uart2 'Container %(cn)d UART2 Menu'
|
cont%(cn)d_device_uart2 'Container %(cn)d UART2 Menu'
|
||||||
cont%(cn)d_device_uart3 'Container %(cn)d UART3 Menu'
|
cont%(cn)d_device_uart3 'Container %(cn)d UART3 Menu'
|
||||||
cont%(cn)d_device_timer1 'Container %(cn)d TIMER1 Menu'
|
cont%(cn)d_device_timer1 'Container %(cn)d TIMER23 Menu'
|
||||||
cont%(cn)d_device_timer2 'Container %(cn)d TIMER2 Menu'
|
|
||||||
cont%(cn)d_device_timer3 'Container %(cn)d TIMER3 Menu'
|
|
||||||
|
|
||||||
CONT%(cn)d_CAP_UART1_DEVICE_USE 'Container %(cn)d UART1 Enable'
|
CONT%(cn)d_CAP_UART1_DEVICE_USE 'Container %(cn)d UART1 Enable'
|
||||||
CONT%(cn)d_CAP_UART2_DEVICE_USE 'Container %(cn)d UART2 Enable'
|
CONT%(cn)d_CAP_UART2_DEVICE_USE 'Container %(cn)d UART2 Enable'
|
||||||
CONT%(cn)d_CAP_UART3_DEVICE_USE 'Container %(cn)d UART3 Enable'
|
CONT%(cn)d_CAP_UART3_DEVICE_USE 'Container %(cn)d UART3 Enable'
|
||||||
CONT%(cn)d_CAP_TIMER1_DEVICE_USE 'Container %(cn)d TIMER1 Enable'
|
CONT%(cn)d_CAP_TIMER1_DEVICE_USE 'Container %(cn)d TIMER23 Enable'
|
||||||
CONT%(cn)d_CAP_TIMER2_DEVICE_USE 'Container %(cn)d TIMER2 Enable'
|
|
||||||
CONT%(cn)d_CAP_TIMER3_DEVICE_USE 'Container %(cn)d TIMER3 Enable'
|
|
||||||
|
|
||||||
default CONT%(cn)d_CAP_UART1_DEVICE_USE from n
|
default CONT%(cn)d_CAP_UART1_DEVICE_USE from n
|
||||||
default CONT%(cn)d_CAP_UART2_DEVICE_USE from n
|
default CONT%(cn)d_CAP_UART2_DEVICE_USE from n
|
||||||
default CONT%(cn)d_CAP_UART3_DEVICE_USE from n
|
default CONT%(cn)d_CAP_UART3_DEVICE_USE from n
|
||||||
default CONT%(cn)d_CAP_TIMER1_DEVICE_USE from n
|
default CONT%(cn)d_CAP_TIMER1_DEVICE_USE from n
|
||||||
default CONT%(cn)d_CAP_TIMER2_DEVICE_USE from n
|
|
||||||
default CONT%(cn)d_CAP_TIMER3_DEVICE_USE from n
|
|
||||||
|
|
||||||
# Note: We are suppressing the menu not symbol here, as in future
|
# Note: We are suppressing the menu not symbol here, as in future
|
||||||
# we will add new parameters to menu, so suprpressing each symbol
|
# we will add new parameters to menu, so suprpressing each symbol
|
||||||
@@ -321,46 +315,6 @@ when CONT3_CAP_TIMER1_DEVICE_USE == y suppress
|
|||||||
cont1_device_timer1
|
cont1_device_timer1
|
||||||
cont2_device_timer1
|
cont2_device_timer1
|
||||||
|
|
||||||
when CONT0_CAP_TIMER2_DEVICE_USE == y suppress
|
|
||||||
cont1_device_timer2
|
|
||||||
cont2_device_timer2
|
|
||||||
cont3_device_timer2
|
|
||||||
|
|
||||||
when CONT1_CAP_TIMER2_DEVICE_USE == y suppress
|
|
||||||
cont0_device_timer2
|
|
||||||
cont2_device_timer2
|
|
||||||
cont3_device_timer2
|
|
||||||
|
|
||||||
when CONT2_CAP_TIMER2_DEVICE_USE == y suppress
|
|
||||||
cont0_device_timer2
|
|
||||||
cont1_device_timer2
|
|
||||||
cont3_device_timer2
|
|
||||||
|
|
||||||
when CONT3_CAP_TIMER2_DEVICE_USE == y suppress
|
|
||||||
cont0_device_timer2
|
|
||||||
cont1_device_timer2
|
|
||||||
cont2_device_timer2
|
|
||||||
|
|
||||||
when CONT0_CAP_TIMER3_DEVICE_USE == y suppress
|
|
||||||
cont1_device_timer3
|
|
||||||
cont2_device_timer3
|
|
||||||
cont3_device_timer3
|
|
||||||
|
|
||||||
when CONT1_CAP_TIMER3_DEVICE_USE == y suppress
|
|
||||||
cont0_device_timer3
|
|
||||||
cont2_device_timer3
|
|
||||||
cont3_device_timer3
|
|
||||||
|
|
||||||
when CONT2_CAP_TIMER3_DEVICE_USE == y suppress
|
|
||||||
cont0_device_timer3
|
|
||||||
cont1_device_timer3
|
|
||||||
cont3_device_timer3
|
|
||||||
|
|
||||||
when CONT3_CAP_TIMER3_DEVICE_USE == y suppress
|
|
||||||
cont0_device_timer3
|
|
||||||
cont1_device_timer3
|
|
||||||
cont2_device_timer3
|
|
||||||
|
|
||||||
menu cont%(cn)d_device_uart1
|
menu cont%(cn)d_device_uart1
|
||||||
CONT%(cn)d_CAP_UART1_DEVICE_USE
|
CONT%(cn)d_CAP_UART1_DEVICE_USE
|
||||||
|
|
||||||
@@ -373,19 +327,12 @@ menu cont%(cn)d_device_uart3
|
|||||||
menu cont%(cn)d_device_timer1
|
menu cont%(cn)d_device_timer1
|
||||||
CONT%(cn)d_CAP_TIMER1_DEVICE_USE
|
CONT%(cn)d_CAP_TIMER1_DEVICE_USE
|
||||||
|
|
||||||
menu cont%(cn)d_device_timer2
|
|
||||||
CONT%(cn)d_CAP_TIMER2_DEVICE_USE
|
|
||||||
|
|
||||||
menu cont%(cn)d_device_timer3
|
|
||||||
CONT%(cn)d_CAP_TIMER3_DEVICE_USE
|
|
||||||
|
|
||||||
menu cont%(cn)d_device_list
|
menu cont%(cn)d_device_list
|
||||||
cont%(cn)d_device_uart1
|
cont%(cn)d_device_uart1
|
||||||
cont%(cn)d_device_uart2
|
cont%(cn)d_device_uart2
|
||||||
cont%(cn)d_device_uart3
|
cont%(cn)d_device_uart3
|
||||||
cont%(cn)d_device_timer1
|
cont%(cn)d_device_timer1
|
||||||
cont%(cn)d_device_timer2
|
|
||||||
cont%(cn)d_device_timer3
|
|
||||||
#
|
#
|
||||||
# Settings for Custom Capabilities
|
# Settings for Custom Capabilities
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
/* Frequency of timer in MHz */
|
/* Frequency of timer in MHz */
|
||||||
#define TIMER_FREQUENCY 1
|
#define TIMER_FREQUENCY 1
|
||||||
|
|
||||||
#define TIMERS_TOTAL 3
|
#define TIMERS_TOTAL 1
|
||||||
|
|
||||||
static struct capability caparray[32];
|
static struct capability caparray[32];
|
||||||
static int total_caps = 0;
|
static int total_caps = 0;
|
||||||
|
|||||||
@@ -58,8 +58,7 @@ int platform_setup_device_caps(struct kernel_resources *kres)
|
|||||||
|
|
||||||
/* Setup timer1 capability as free */
|
/* Setup timer1 capability as free */
|
||||||
timer[1] = alloc_bootmem(sizeof(*timer[1]), 0);
|
timer[1] = alloc_bootmem(sizeof(*timer[1]), 0);
|
||||||
timer[1]->start =
|
timer[1]->start = __pfn(PB926_TIMER23_BASE);
|
||||||
__pfn(PB926_TIMER01_BASE + PLATFORM_TIMER_REL_OFFSET);
|
|
||||||
timer[1]->end = timer[1]->start + 1;
|
timer[1]->end = timer[1]->start + 1;
|
||||||
timer[1]->size = timer[1]->end - timer[1]->start;
|
timer[1]->size = timer[1]->end - timer[1]->start;
|
||||||
cap_set_devtype(timer[1], CAP_DEVTYPE_TIMER);
|
cap_set_devtype(timer[1], CAP_DEVTYPE_TIMER);
|
||||||
@@ -67,27 +66,6 @@ int platform_setup_device_caps(struct kernel_resources *kres)
|
|||||||
link_init(&timer[1]->list);
|
link_init(&timer[1]->list);
|
||||||
cap_list_insert(timer[1], &kres->devmem_free);
|
cap_list_insert(timer[1], &kres->devmem_free);
|
||||||
|
|
||||||
/* Setup timer2 capability as free */
|
|
||||||
timer[2] = alloc_bootmem(sizeof(*timer[2]), 0);
|
|
||||||
timer[2]->start = __pfn(PB926_TIMER23_BASE);
|
|
||||||
timer[2]->end = timer[2]->start + 1;
|
|
||||||
timer[2]->size = timer[2]->end - timer[2]->start;
|
|
||||||
cap_set_devtype(timer[2], CAP_DEVTYPE_TIMER);
|
|
||||||
cap_set_devnum(timer[2], 2);
|
|
||||||
link_init(&timer[2]->list);
|
|
||||||
cap_list_insert(timer[2], &kres->devmem_free);
|
|
||||||
|
|
||||||
/* Setup timer3 capability as free */
|
|
||||||
timer[3] = alloc_bootmem(sizeof(*timer[3]), 0);
|
|
||||||
timer[3]->start =
|
|
||||||
__pfn(PB926_TIMER23_BASE + PLATFORM_TIMER_REL_OFFSET);
|
|
||||||
timer[3]->end = timer[3]->start + 1;
|
|
||||||
timer[3]->size = timer[3]->end - timer[3]->start;
|
|
||||||
cap_set_devtype(timer[3], CAP_DEVTYPE_TIMER);
|
|
||||||
cap_set_devnum(timer[3], 3);
|
|
||||||
link_init(&timer[3]->list);
|
|
||||||
cap_list_insert(timer[3], &kres->devmem_free);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user