And are you sure the amound of pins in bank 0, 1, 2 is the same on mx233 and
mx28 ?
Yes, I'm sure they're not ;-). I went through the manual and changed it into
this:
static const int mxs_bank_pins[] = {
#ifdefined(CONFIG_MX23)
MX23_BANK0_PINS,
MX23_BANK1_PINS,
MX23_BANK2_PINS
#elifdefine
> > Careful here !!
> >
> > The driver _should_ work for MX233 too! What I'd like to see is you
> > introducing a function like:
> >
> > int mxs_gpio_is_valid(gpio)
> > {
> > char mxs_banks[PINCTRL_BANKS] = PINCTRL_BANK_COUNTS;
> >
> > if (PAD_PIN(gpio) > mxs_bank[PAD_BANK(gpio)])
> > return -EI
> Careful here !!
>
> The driver _should_ work for MX233 too! What I'd like to see is you
> introducing
> a function like:
>
> int mxs_gpio_is_valid(gpio)
> {
> char mxs_banks[PINCTRL_BANKS] = PINCTRL_BANK_COUNTS;
>
> if (PAD_PIN(gpio) > mxs_bank[PAD_BANK(gpio)])
> return -EINVAL;
>
> return
> > Careful here !!
> >
> > The driver _should_ work for MX233 too! What I'd like to see is you
> > introducing a function like:
> >
> > int mxs_gpio_is_valid(gpio)
> > {
> > char mxs_banks[PINCTRL_BANKS] = PINCTRL_BANK_COUNTS;
> >
> > if (PAD_PIN(gpio) > mxs_bank[PAD_BANK(gpio)])
> >
> > r
> static const int all_bank_pins[] = {
> MXS_BANK0_PINS,
> MXS_BANK1_PINS,
> MXS_BANK2_PINS,
> MXS_BANK3_PINS,
> MXS_BANK4_PINS,
> };
> bank_pins = all_bank_pins[PAD_PANK(gp)];
Good one!
But how about the changes Marek suggested about name_to_gpio_number?
Robert.
__
On Tuesday 22 November 2011 09:41:48 Robert Deliën wrote:
> + switch(PAD_BANK(gp)) {
needs a space after that "switch"
> + case 0:
> + bank_pins = MXS_BANK0_PINS;
> + break;
> + case 1:
> + bank_pins = MXS_BANK1_PINS;
> + b
> Careful here !!
>
> The driver _should_ work for MX233 too! What I'd like to see is you
> introducing
> a function like:
>
> int mxs_gpio_is_valid(gpio)
> {
> char mxs_banks[PINCTRL_BANKS] = PINCTRL_BANK_COUNTS;
>
> if (PAD_PIN(gpio) > mxs_bank[PAD_BANK(gpio)])
> return -EINVAL;
>
> r
> This patch fixes a small bug that allowed unintended manipulation of
> non-existing GPIO pins within a pin bank, clobbering reserved bits.
>
> Signed-off-by: Robert Deliën
> diff --git a/arch/arm/include/asm/arch-mx28/iomux.h
> b/arch/arm/include/asm/arch-mx28/iomux.h index 7abdf58..829d9a8 100
> > To make things simple for users, there's standard layout. It's actually
> > at sector 2048 btw.
>
> Got that.
>
> > That's what happens internally, it's just that some pieces (like sector
> > offset of the partition!) need to be filled into the bootstream header
> > by the mxsboot utility --
> To make things simple for users, there's standard layout. It's actually at
> sector 2048 btw.
Got that.
> That's what happens internally, it's just that some pieces (like sector
> offset
> of the partition!) need to be filled into the bootstream header by the
> mxsboot
> utility -- see mxs
> Hi Marek,
>
> > Hey, this looks reasonable. Did you send similar patch to Linux too ?
>
> No, I'm not at that yet. I'm just starting to explore the New U-Boot: It's
> been since version 1.1.2 that I have actually contributed something.
>
> My current project requires a mechanism to manipulate
> This patch fixes a small bug that allowed unintended manipulation of
> non-existing GPIO pins within a pin bank, clobbering reserved bits.
>
> Signed-off-by: Robert Deliën
> diff --git a/arch/arm/include/asm/arch-mx28/iomux.h
> b/arch/arm/include/asm/arch-mx28/iomux.h index 7abdf58..829d9a8 100
This patch fixes a small bug that allowed unintended manipulation of
non-existing GPIO pins within a pin bank, clobbering reserved bits.
Signed-off-by: Robert Deliën
diff --git a/arch/arm/include/asm/arch-mx28/iomux.h
b/arch/arm/include/asm/arch-mx28/iomux.h
index 7abdf58..829d9a8 100644
--- a/
13 matches
Mail list logo