[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/5] Refactor i.MX6UL processor code
From: |
Peter Maydell |
Subject: |
Re: [PATCH v3 1/5] Refactor i.MX6UL processor code |
Date: |
Mon, 7 Aug 2023 17:27:41 +0100 |
On Wed, 2 Aug 2023 at 22:09, Jean-Christophe Dubois <jcd@tribudubois.net> wrote:
>
> * Add Addr and size definition for all i.MX6UL devices in i.MX6UL header file.
> * Use those newly defined named constants whenever possible.
> * Standardize the way we init a familly of unimplemented devices
> - SAI
> - PWM (add missing PWM instances)
> - CAN
> * Add/rework few comments
>
> Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
>
> /*
> - * PWM
> + * PWMs
> */
> - create_unimplemented_device("pwm1", FSL_IMX6UL_PWM1_ADDR, 0x4000);
> - create_unimplemented_device("pwm2", FSL_IMX6UL_PWM2_ADDR, 0x4000);
> - create_unimplemented_device("pwm3", FSL_IMX6UL_PWM3_ADDR, 0x4000);
> - create_unimplemented_device("pwm4", FSL_IMX6UL_PWM4_ADDR, 0x4000);
> + for (i = 0; i < FSL_IMX6UL_NUM_PWMS; i++) {
> + static const hwaddr FSL_IMX6UL_PWMn_ADDR[FSL_IMX6UL_NUM_PWMS] = {
> + FSL_IMX6UL_PWM1_ADDR,
> + FSL_IMX6UL_PWM2_ADDR,
> + FSL_IMX6UL_PWM3_ADDR,
> + FSL_IMX6UL_PWM4_ADDR,
> + FSL_IMX6UL_PWM5_ADDR,
> + FSL_IMX6UL_PWM6_ADDR,
> + FSL_IMX6UL_PWM7_ADDR,
> + FSL_IMX6UL_PWM8_ADDR,
> + };
> +
> + snprintf(name, NAME_SIZE, "pwm%d", i);
> + create_unimplemented_device(name, FSL_IMX6UL_PWMn_ADDR[i],
> + FSL_IMX6UL_PWMn_SIZE);
> + }
This looks like a behaviour change -- we used to create 4
pwm devices, and now we create 8.
thanks
-- PMM
- [PATCH v3 0/5] Complete i.MX6UL and i.MX7 processor for bare metal application., Jean-Christophe Dubois, 2023/08/02
- [PATCH v3 1/5] Refactor i.MX6UL processor code, Jean-Christophe Dubois, 2023/08/02
- [PATCH v3 2/5] Add i.MX6UL TZ missing devices., Jean-Christophe Dubois, 2023/08/02
- [PATCH v3 3/5] Refactor i.MX7 processor code, Jean-Christophe Dubois, 2023/08/02
- [PATCH v3 4/5] Add i.MX7 missing TZ devices and memory regions, Jean-Christophe Dubois, 2023/08/02
- [PATCH v3 5/5] Add i.MX7 SRC device implementation, Jean-Christophe Dubois, 2023/08/02