diff options
Diffstat (limited to 'arch/avr32/cpu')
-rw-r--r-- | arch/avr32/cpu/Makefile | 2 | ||||
-rw-r--r-- | arch/avr32/cpu/at32ap700x/clk.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/avr32/cpu/Makefile b/arch/avr32/cpu/Makefile index 5e11721257..00cede3fd9 100644 --- a/arch/avr32/cpu/Makefile +++ b/arch/avr32/cpu/Makefile @@ -16,3 +16,5 @@ obj-y += cache.o obj-y += interrupts.o obj-$(CONFIG_PORTMUX_PIO) += portmux-pio.o obj-$(CONFIG_PORTMUX_GPIO) += portmux-gpio.o + +obj-$(if $(filter at32ap700x,$(SOC)),y) += at32ap700x/ diff --git a/arch/avr32/cpu/at32ap700x/clk.c b/arch/avr32/cpu/at32ap700x/clk.c index d5dbe3b908..0fc6088e3e 100644 --- a/arch/avr32/cpu/at32ap700x/clk.c +++ b/arch/avr32/cpu/at32ap700x/clk.c @@ -72,7 +72,7 @@ unsigned long __gclk_set_rate(unsigned int id, enum gclk_parent parent, sm_writel(PM_GCCTRL(id), parent | SM_BIT(CEN)); rate = parent_rate; } else { - divider = min(255, divider / 2 - 1); + divider = min(255UL, divider / 2 - 1); sm_writel(PM_GCCTRL(id), parent | SM_BIT(CEN) | SM_BIT(DIVEN) | SM_BF(DIV, divider)); rate = parent_rate / (2 * (divider + 1)); |