authorNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 22 Sep 2015 01:00:43 +0000 (03:00 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 22 Sep 2015 01:00:43 +0000 (03:00 +0200)
core/system.c

index c9c0e22..382e723 100644 (file)
@@ -121,7 +121,7 @@ void set_subsystem_clk_divider(uint32_t subsystem, uint32_t clk_div)
 {
        struct lpc_sys_control* sys_ctrl = LPC_SYS_CONTROL;
 
-       sys_ctrl->pclk_sel[ (subsystem & 0x80) ] = ((clk_div & 0x03) << (subsystem & 0x1E));
+       sys_ctrl->pclk_sel[ ((subsystem & 0x80) >> 7) ] = ((clk_div & 0x03) << (subsystem & 0x1E));
 }