* [PATCH] m68k/mac: Make SCC reset work more reliably
@ 2014-01-12 13:56 Finn Thain
2014-01-13 15:47 ` Geert Uytterhoeven
2014-01-19 10:56 ` Geert Uytterhoeven
0 siblings, 2 replies; 7+ messages in thread
From: Finn Thain @ 2014-01-12 13:56 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k
For SCC initialization we cannot assume that the control register is in
the correct state to accept a register pointer. So first read from the
control register in order to "sync" up.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
This patch fixes a boot failure (presumably caused by unhandled SCC
interrupt) on PowerBook 180 with CONFIG_EARLY_PRINTK and with the
bootloader not configured to wake up the serial ports. AFAIK this happens
only on PowerBooks. Even with this fix, Penguin still has to wake the
serial ports or else they don't function on PowerBooks like this one.
diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S
--- a/arch/m68k/kernel/head.S
+++ b/arch/m68k/kernel/head.S
@@ -2909,7 +2909,9 @@ func_start serial_init,%d0/%d1/%a0/%a1
#if defined(MAC_USE_SCC_A) || defined(MAC_USE_SCC_B)
movel %pc@(L(mac_sccbase)),%a0
- /* Reset SCC device */
+ /* Reset SCC register pointer */
+ moveb %a0@(mac_scc_cha_a_ctrl_offset),%d0
+ /* Reset SCC device: write register pointer then register value */
moveb #9,%a0@(mac_scc_cha_a_ctrl_offset)
moveb #0xc0,%a0@(mac_scc_cha_a_ctrl_offset)
/* Wait for 5 PCLK cycles, which is about 68 CPU cycles */
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k/mac: Make SCC reset work more reliably
2014-01-12 13:56 [PATCH] m68k/mac: Make SCC reset work more reliably Finn Thain
@ 2014-01-13 15:47 ` Geert Uytterhoeven
2014-01-14 8:31 ` Finn Thain
2014-01-19 10:56 ` Geert Uytterhoeven
1 sibling, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2014-01-13 15:47 UTC (permalink / raw)
To: Finn Thain; +Cc: Linux/m68k
Hi Finn,
On Sun, Jan 12, 2014 at 2:56 PM, Finn Thain <fthain@telegraphics.com.au> wrote:
> For SCC initialization we cannot assume that the control register is in
> the correct state to accept a register pointer. So first read from the
> control register in order to "sync" up.
>
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Thaks for your patch!
> ---
>
> This patch fixes a boot failure (presumably caused by unhandled SCC
> interrupt) on PowerBook 180 with CONFIG_EARLY_PRINTK and with the
> bootloader not configured to wake up the serial ports. AFAIK this happens
> only on PowerBooks. Even with this fix, Penguin still has to wake the
> serial ports or else they don't function on PowerBooks like this one.
IMHO the above should be part of the patch description (i.e. above the
three dashes), as it contains valuable information. Is that OK for you?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k/mac: Make SCC reset work more reliably
2014-01-13 15:47 ` Geert Uytterhoeven
@ 2014-01-14 8:31 ` Finn Thain
2014-01-14 8:52 ` Geert Uytterhoeven
0 siblings, 1 reply; 7+ messages in thread
From: Finn Thain @ 2014-01-14 8:31 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux/m68k
On Mon, 13 Jan 2014, Geert Uytterhoeven wrote:
> Hi Finn,
>
> On Sun, Jan 12, 2014 at 2:56 PM, Finn Thain <fthain@telegraphics.com.au>
> wrote:
> > For SCC initialization we cannot assume that the control register is
> > in the correct state to accept a register pointer. So first read from
> > the control register in order to "sync" up.
> >
> > Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
>
> Thaks for your patch!
>
> > ---
> >
> > This patch fixes a boot failure (presumably caused by unhandled SCC
> > interrupt) on PowerBook 180 with CONFIG_EARLY_PRINTK and with the
> > bootloader not configured to wake up the serial ports.
> > AFAIK this happens only on PowerBooks. Even with this fix, Penguin
> > still has to wake the serial ports or else they don't function on
> > PowerBooks like this one.
>
> IMHO the above should be part of the patch description (i.e. above the
> three dashes), as it contains valuable information. Is that OK for you?
The first part is good information, especially if this were submitted to
-stable.
The rest, beginning with "AFAIK", is really guesswork based on anecdote
(e.g. reports from users not affected). Even the mailing list archives are
perhaps too permanent (e.g. the need for the wake-up workaround may go
away one day).
I'm unsure about submitting this to -stable. I don't like the idea that
the first debian user to boot a powerbook might see a crash (depending on
bootloader etc). But not all stable trees carry df66834a which is a
prerequisite. This patch is only applicable to 3.4.y and >= 3.9.y. Can you
nominate particular stable trees?
Finn
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k/mac: Make SCC reset work more reliably
2014-01-14 8:31 ` Finn Thain
@ 2014-01-14 8:52 ` Geert Uytterhoeven
2014-01-14 21:15 ` Finn Thain
0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2014-01-14 8:52 UTC (permalink / raw)
To: Finn Thain; +Cc: Linux/m68k
On Tue, Jan 14, 2014 at 9:31 AM, Finn Thain <fthain@telegraphics.com.au> wrote:
> On Mon, 13 Jan 2014, Geert Uytterhoeven wrote:
>> On Sun, Jan 12, 2014 at 2:56 PM, Finn Thain <fthain@telegraphics.com.au>
>> wrote:
>> > For SCC initialization we cannot assume that the control register is
>> > in the correct state to accept a register pointer. So first read from
>> > the control register in order to "sync" up.
>> >
>> > Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
>>
>> Thaks for your patch!
>>
>> > ---
>> >
>
>> > This patch fixes a boot failure (presumably caused by unhandled SCC
>> > interrupt) on PowerBook 180 with CONFIG_EARLY_PRINTK and with the
>> > bootloader not configured to wake up the serial ports.
>
>> > AFAIK this happens only on PowerBooks. Even with this fix, Penguin
>> > still has to wake the serial ports or else they don't function on
>> > PowerBooks like this one.
>
>> IMHO the above should be part of the patch description (i.e. above the
>> three dashes), as it contains valuable information. Is that OK for you?
>
> The first part is good information, especially if this were submitted to
> -stable.
>
> The rest, beginning with "AFAIK", is really guesswork based on anecdote
> (e.g. reports from users not affected). Even the mailing list archives are
> perhaps too permanent (e.g. the need for the wake-up workaround may go
> away one day).
OK.
> I'm unsure about submitting this to -stable. I don't like the idea that
> the first debian user to boot a powerbook might see a crash (depending on
> bootloader etc). But not all stable trees carry df66834a which is a
> prerequisite. This patch is only applicable to 3.4.y and >= 3.9.y. Can you
> nominate particular stable trees?
Sure, just add it to the comment, cfr. Documentation/stable_kernel_rules.txt:
- If the patch requires other patches as prerequisites which can be
cherry-picked than this can be specified in the following format in
the sign-off area:
Cc: <stable@vger.kernel.org> # 3.3.x: a1f84a3: sched: Check for idle
Cc: <stable@vger.kernel.org> # 3.3.x: 1b9508f: sched: Rate-limit newidle
Cc: <stable@vger.kernel.org> # 3.3.x: fd21073: sched: Fix affinity logic
Cc: <stable@vger.kernel.org> # 3.3.x
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k/mac: Make SCC reset work more reliably
2014-01-14 8:52 ` Geert Uytterhoeven
@ 2014-01-14 21:15 ` Finn Thain
2014-01-16 11:18 ` Thorsten Glaser
0 siblings, 1 reply; 7+ messages in thread
From: Finn Thain @ 2014-01-14 21:15 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Linux/m68k
On Tue, 14 Jan 2014, Geert Uytterhoeven wrote:
>
> > I'm unsure about submitting this to -stable. I don't like the idea
> > that the first debian user to boot a powerbook might see a crash
> > (depending on bootloader etc). But not all stable trees carry df66834a
> > which is a prerequisite. This patch is only applicable to 3.4.y and >=
> > 3.9.y. Can you nominate particular stable trees?
>
> Sure, just add it to the comment, cfr.
> Documentation/stable_kernel_rules.txt:
Yes. I read the docs before I wrote.
>
> - If the patch requires other patches as prerequisites which can be
> cherry-picked than this can be specified in the following format in
> the sign-off area:
>
> Cc: <stable@vger.kernel.org> # 3.3.x: a1f84a3: sched: Check for idle
> Cc: <stable@vger.kernel.org> # 3.3.x: 1b9508f: sched: Rate-limit newidle
> Cc: <stable@vger.kernel.org> # 3.3.x: fd21073: sched: Fix affinity logic
> Cc: <stable@vger.kernel.org> # 3.3.x
I didn't want the commit to be cherry-picked as it's already there (under
different commit IDs) in some stable trees.
The prerequisite commit is df66834a in mainline (merged in 3.10). It is
known as f64747c9 in 3.9.y and 8cfd67a3 in 3.4.y.
I only checked the trees in linux-stable.git which is not exhaustive but
there are some stable trees that don't have it at all.
Perhaps it would be best to request that the new patch only gets applied
where the prerequisite patch was already in mainline, i.e. >= 3.10.
Finn
>
> Gr{oetje,eeting}s,
>
> Geert
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k/mac: Make SCC reset work more reliably
2014-01-14 21:15 ` Finn Thain
@ 2014-01-16 11:18 ` Thorsten Glaser
0 siblings, 0 replies; 7+ messages in thread
From: Thorsten Glaser @ 2014-01-16 11:18 UTC (permalink / raw)
To: linux-m68k
Finn Thain <fthain <at> telegraphics.com.au> writes:
> Perhaps it would be best to request that the new patch only gets applied
> where the prerequisite patch was already in mainline, i.e. >= 3.10.
FWIW Debian has 3.12, with 3.13 coming Soon™.
//mirabilos
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] m68k/mac: Make SCC reset work more reliably
2014-01-12 13:56 [PATCH] m68k/mac: Make SCC reset work more reliably Finn Thain
2014-01-13 15:47 ` Geert Uytterhoeven
@ 2014-01-19 10:56 ` Geert Uytterhoeven
1 sibling, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2014-01-19 10:56 UTC (permalink / raw)
To: Finn Thain; +Cc: Linux/m68k
On Sun, Jan 12, 2014 at 2:56 PM, Finn Thain <fthain@telegraphics.com.au> wrote:
> For SCC initialization we cannot assume that the control register is in
> the correct state to accept a register pointer. So first read from the
> control register in order to "sync" up.
>
> Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Thanks, applied and queued for 3.14.
We can decide about the stableness after it has been merged into
upstream.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-01-19 10:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-12 13:56 [PATCH] m68k/mac: Make SCC reset work more reliably Finn Thain
2014-01-13 15:47 ` Geert Uytterhoeven
2014-01-14 8:31 ` Finn Thain
2014-01-14 8:52 ` Geert Uytterhoeven
2014-01-14 21:15 ` Finn Thain
2014-01-16 11:18 ` Thorsten Glaser
2014-01-19 10:56 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox