Hi, On Tue, Apr 10, 2018 at 11:34 AM, Karthik Ramasubramanian <kramasub@xxxxxxxxxxxxxx> wrote: > Hi Bjorn, > > Thanks for pulling it into your tree and helping with the verification. > > On 4/9/2018 5:46 PM, Bjorn Andersson wrote: >> On Mon 09 Apr 12:38 PDT 2018, Karthikeyan Ramasubramanian wrote: >> >>> Add early console support in Qualcomm Technologies Inc., GENI based >>> UART controller. >>> >> >> Hi Karthikeyan, >> >> I pulled this into my SDM845 tree and added "earlycon" to my command >> line, the result is a working console up until the serial driver is >> probed at which point the console stops. >> >> >> I'm expecting that this should hand over to the normal console as it is >> probed, unless I specify keep_bootcon in which case I expect all log >> entries to be printed both through the earlycon and the normal console >> (i.e. show up twice on the uart). > I suspect the issue is something to do with clocks. I will look into it > further and fix in the next submission. > > This is my current hypothesis: When the driver gets probed, it registers > the uart port which in turn invokes the console setup. The console setup > enables the "se" clock (geni_resources_on()->clk_prepare_enable()). > Enabling the "se" clock is disturbing the rate that the clock is already > on. Early console write is simultaneously going on while the console is > being set up and this clock disturbance is causing the halt. Or it could be a simple bug in this code. Specifically, your "custom implementation instead of readl_poll_atomic" is wrong. You don't ensure that "timeout_us" is evenly divisible by 10, yet you do: while (timeout_us) { ...; udelay(10); timeout_us -= 10; } One way to fix this is with this before the loop: timeout_us = DIV_ROUND_UP(timeout_us, 10) * 10; BTW: are you planning to spin this patch series anytime soon? -Doug -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html