mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Trent Piepho <trent.piepho@igorinstitute.com>
To: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH v2] ARM: imx: add support for TQMa6UL SoM on MBa6ulxl
Date: Thu, 17 Jun 2021 17:03:00 -0700	[thread overview]
Message-ID: <CAMHeXxNHnqwoBx7w_Hchrp4ZAM9PPtrgu1q0A5k-YW-1-W31gw@mail.gmail.com> (raw)
In-Reply-To: <20210617092303.241349-1-r.czerwinski@pengutronix.de>

On Thu, Jun 17, 2021 at 2:25 AM Rouven Czerwinski
<r.czerwinski@pengutronix.de> wrote:
> +
> +static void setup_uart(void)
> +{
> +       void __iomem *iomuxbase = (void *)MX6_IOMUXC_BASE_ADDR;
> +
> +       imx6_ungate_all_peripherals();
> +
> +       imx_setup_pad(iomuxbase, MX6_PAD_UART1_TX_DATA__UART1_DCE_TX);
> +       imx_setup_pad(iomuxbase, MX6_PAD_UART1_RX_DATA__UART1_DCE_RX);

>From what I can tell, imx_setup_pad() will program the conf register
with 0.  Not a more typical value like 0x1b0b1 that is in most dts
files.  Does this actually work?  It seems like one needs to OR in the
pad conf value to the pinmux config constant to actually program this
correctly.

> +       imx6_uart_setup((void *)MX6_UART1_BASE_ADDR);
> +       pbl_set_putc(imx_uart_putc, (void *)MX6_UART1_BASE_ADDR);
> +
> +       pr_debug("\n");

Do you actually get the output from this?  I'm trying to add a new
imx6ul board and it seems like one needs a delay between the uart
setup and the uart actually working to output data.  Or perhaps this
is just my board.

> +static void noinline start_mba6ulx(void)
> +{
> +       setup_uart();

Why setup uart when LL_DEBUG is not enabled?  This dts should have
this working without any extra setup.

> +
> +       imx6ul_barebox_entry(__dtb_z_imx6ul_mba6ulx_start);
> +}
> +
> +ENTRY_FUNCTION(start_imx6ul_mba6ulx, r0, r1, r2)
> +{
> +
> +       imx6ul_cpu_lowlevel_init();
> +
> +       arm_setup_stack(0x00910000);
> +
> +       if (IS_ENABLED(CONFIG_DEBUG_LL)) {
> +               imx6_uart_setup_ll();

Don't you need the muxing and other code in setup_uart() for this to work?

> +               putc_ll('>');
> +       }
> +
> +       relocate_to_current_adr();
> +       setup_c();
> +       barrier();
> +
> +       start_mba6ulx();

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2021-06-18  0:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17  9:23 Rouven Czerwinski
2021-06-18  0:03 ` Trent Piepho [this message]
2022-02-07 15:15   ` Rouven Czerwinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMHeXxNHnqwoBx7w_Hchrp4ZAM9PPtrgu1q0A5k-YW-1-W31gw@mail.gmail.com \
    --to=trent.piepho@igorinstitute.com \
    --cc=barebox@lists.infradead.org \
    --cc=r.czerwinski@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox