void s_init(void) { struct rcar_rwdt *rwdt = (struct rcar_rwdt *)RWDT_BASE; struct rcar_swdt *swdt = (struct rcar_swdt *)SWDT_BASE; /* Watchdog init */ writel(0xA5A5A500, &rwdt->rwtcsra); writel(0xA5A5A500, &swdt->swtcsra); /* QoS */ qos_init(); }
void s_init(void) { struct r8a7790_rwdt *rwdt = (struct r8a7790_rwdt *)RWDT_BASE; struct r8a7790_swdt *swdt = (struct r8a7790_swdt *)SWDT_BASE; /* Watchdog init */ writel(0xA5A5A500, &rwdt->rwtcsra); writel(0xA5A5A500, &swdt->swtcsra); /* QoS(Quality-of-Service) Init */ qos_init(); /* BSC init */ bsc_init(); }
int main(void){ qos_init(); // a timer task called every tick. const int task_timer = qos_timer_open( timer_task, NULL, US_PER_TICK ); qos_task_set_name( task_timer, "task_timer" ); // a very heavy idle task const int task_idle1 = qos_idle_open( idle_task1, NULL ); qos_task_set_name( task_idle1, "idle1" ); // a idle task which delay 2 tick. const int task_idle2 = qos_idle_open( idle_task2, NULL ); qos_task_set_name( task_idle2, "idle2" ); qos_start(); printf( "qos quit\n" ); return 0; }
void s_init(void) { struct rcar_rwdt *rwdt = (struct rcar_rwdt *)RWDT_BASE; struct rcar_swdt *swdt = (struct rcar_swdt *)SWDT_BASE; u32 stc; /* Watchdog init */ writel(0xA5A5A500, &rwdt->rwtcsra); writel(0xA5A5A500, &swdt->swtcsra); /* CPU frequency setting. Set to 1.5GHz */ stc = ((1500 / CLK2MHZ(CONFIG_SYS_CLK_FREQ)) - 1) << PLL0_STC_BIT; clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc); /* QoS */ qos_init(); }
void s_init(void) { struct rcar_rwdt *rwdt = (struct rcar_rwdt *)RWDT_BASE; struct rcar_swdt *swdt = (struct rcar_swdt *)SWDT_BASE; /* Watchdog init */ writel(0xA5A5A500, &rwdt->rwtcsra); writel(0xA5A5A500, &swdt->swtcsra); /* CPU frequency setting. Set to 1.4GHz */ if (rmobile_get_cpu_rev_integer() >= R8A7790_CUT_ES2X) { u32 stat = 0; u32 stc = ((1400 / CLK2MHZ(CONFIG_SYS_CLK_FREQ)) - 1) << PLL0_STC_BIT; clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc); do { stat = readl(PLLECR) & PLL0ST; } while (stat == 0x0); } /* QoS(Quality-of-Service) Init */ qos_init(); }
int main(void){ qos_init(); app_init(); qos_start(); return 0; }