Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5425149pxu; Thu, 22 Oct 2020 01:46:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqENt9KONW8vVjPN2PbtXBdO6afImL/r0INq9nftwJuarkDQzjA3umwBdJ8nSC2o3dXC0X X-Received: by 2002:a17:906:715a:: with SMTP id z26mr1235857ejj.300.1603356408190; Thu, 22 Oct 2020 01:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603356408; cv=none; d=google.com; s=arc-20160816; b=Rq242qTYsw/oVVOASsRs7K+q/tmVJabjLSBOHRrakddwhrm7TMceWKal1oZUm4wmK/ qzgwP2kbebe3qAjUl6TCaTIsUqNxmoVqMhXsrV+ptQlBAgILz7fq5TxGYV+QlZwMaOzu IOGGtL0AHm0rl1mGINDc6/R9KMGgjKKsWFTW2hPWI8xj9VwGlthGEACotLLyRAORA9tJ 8umxpLMIPPFQqordQPAzzVamau2K3AWGKrn/dTt8cpkSBEo/uRLbKC4EdOKAXyZOmO0k mqPAl3PWvHusbaWFc4dM7XnA2jcs901KksqmP3Q2cdBlyIGygtgxGsoxtyKlU+DwJKNH ry2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=3Wxh2epYIQKmtNhH8kprT0IWQ1xSVOnzFhZ8V7tLn1Q=; b=VP/uD5O0mFSpCdfaRenKykzTM/RPi7eGf1UZS+tW/Vv0ZLdcImY1X9RKCQ7ee05+Ap 4RZJsyDG/4ZMSMKdg/SdhqMvd1sVO1imU3etNsYblzuJKPkYfxLi+XaTHjF/MTqPxeGw b9WW7422TroK0rmPUuLdilk7G2BmevAfUb39SpKHOlAQAcZpSBUwzHLluht61kTQhKqg Tc62X/EbQEvkxsz/BXmUBUKK8dOu5O5/p5rOIcqqonwZ0S5Sppkqj0JMzv2/j6K6hBZz FPUx2KMds/EMOAKcppOGM/Nu7P9S/7g8ob/h2Qw7gJ7QxLeHbJ08rsbXhhQKn64W1+AC NGJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v22si465946ejj.27.2020.10.22.01.46.25; Thu, 22 Oct 2020 01:46:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2508486AbgJVH0S (ORCPT + 99 others); Thu, 22 Oct 2020 03:26:18 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:35600 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395130AbgJVH0S (ORCPT ); Thu, 22 Oct 2020 03:26:18 -0400 Received: by mail-ot1-f66.google.com with SMTP id n11so659044ota.2; Thu, 22 Oct 2020 00:26:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3Wxh2epYIQKmtNhH8kprT0IWQ1xSVOnzFhZ8V7tLn1Q=; b=QO5ER0wAdw0PIHBn9lJNqxppo2VNIasQwOTkuZ/Imcqt8kjjJYMGOlaY448DdERmqX cIUgR/zQdAeIjMrmvbovgSdFQD5LzxFJyvghee7honB31QLxp6hEp0WrdNEzzpM9E69R Nj5VXemQY0FRLMKyRKW4M70p46sImUUCyYlYfxvNnA9oN+VcSIRXrBaVF15MFb2j6Udc TJRv/W2tU6pvNpn78lflEkxBLW/tSv5j95504sb7bZ/cC3kGfKNEAiODQ6VB8HnhVXJW ner8l6dU8eV25/NHkEFcRonR9tUDcKOAXXNbEtixGmJYDV7wuofmoZS1joxx47tktR82 PxMg== X-Gm-Message-State: AOAM532IYACtVdtNIolKfreiBJBYi47aZ2NrOgNYCkCCUbNKE9rVCFfW 34EX2FMvJwNpZL4m6pEbkim/ZficxInMZmG9nL4XFF/wNWk= X-Received: by 2002:a9d:3b76:: with SMTP id z109mr1009002otb.250.1603351576916; Thu, 22 Oct 2020 00:26:16 -0700 (PDT) MIME-Version: 1.0 References: <20201020162303.1730562-1-laurent@vivier.eu> <20201020162844.GA865546@kroah.com> <468bbbef-4745-3b16-b6f4-30b46ebcdc33@vivier.eu> <20201020173745.GA882703@kroah.com> <387fd2aa-b181-c41f-0581-0a7e79a44e41@vivier.eu> <20201020183246.GA912431@kroah.com> <20201020224446.GA15066@allandria.com> <311d17ed-75fa-a7fe-6c70-177a6eec4519@vivier.eu> In-Reply-To: From: Geert Uytterhoeven Date: Thu, 22 Oct 2020 09:26:05 +0200 Message-ID: Subject: Re: [PATCH] serial: pmac_zilog: don't init if zilog is not available To: Finn Thain Cc: Laurent Vivier , Brad Boyer , Greg KH , Linux Kernel Mailing List , Joshua Thompson , "open list:SERIAL DRIVERS" , Benjamin Herrenschmidt , linux-m68k , Paul Mackerras , linuxppc-dev , Michael Ellerman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Finn, On Thu, Oct 22, 2020 at 5:23 AM Finn Thain wrote: > The patch below seems to fix the problem for me. Does it work on your > system(s)? Thanks for your patch! > --- a/arch/m68k/mac/config.c > +++ b/arch/m68k/mac/config.c > @@ -776,16 +776,12 @@ static struct resource scc_b_rsrcs[] = { > struct platform_device scc_a_pdev = { > .name = "scc", > .id = 0, > - .num_resources = ARRAY_SIZE(scc_a_rsrcs), > - .resource = scc_a_rsrcs, > }; > EXPORT_SYMBOL(scc_a_pdev); > > struct platform_device scc_b_pdev = { > .name = "scc", > .id = 1, > - .num_resources = ARRAY_SIZE(scc_b_rsrcs), > - .resource = scc_b_rsrcs, > }; > EXPORT_SYMBOL(scc_b_pdev); > > @@ -812,10 +808,15 @@ static void __init mac_identify(void) > > /* Set up serial port resources for the console initcall. */ > > - scc_a_rsrcs[0].start = (resource_size_t) mac_bi_data.sccbase + 2; > - scc_a_rsrcs[0].end = scc_a_rsrcs[0].start; > - scc_b_rsrcs[0].start = (resource_size_t) mac_bi_data.sccbase; > - scc_b_rsrcs[0].end = scc_b_rsrcs[0].start; > + scc_a_rsrcs[0].start = (resource_size_t)mac_bi_data.sccbase + 2; > + scc_a_rsrcs[0].end = scc_a_rsrcs[0].start; > + scc_a_pdev.num_resources = ARRAY_SIZE(scc_a_rsrcs); > + scc_a_pdev.resource = scc_a_rsrcs; > + > + scc_b_rsrcs[0].start = (resource_size_t)mac_bi_data.sccbase; > + scc_b_rsrcs[0].end = scc_b_rsrcs[0].start; > + scc_b_pdev.num_resources = ARRAY_SIZE(scc_b_rsrcs); > + scc_b_pdev.resource = scc_b_rsrcs; I can't say I'm a fan of this... > > switch (macintosh_config->scc_type) { > case MAC_SCC_PSC: > diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c > index 96e7aa479961..95abdb305d67 100644 > --- a/drivers/tty/serial/pmac_zilog.c > +++ b/drivers/tty/serial/pmac_zilog.c > @@ -1697,18 +1697,17 @@ extern struct platform_device scc_a_pdev, scc_b_pdev; The real issue is this "extern struct platform_device scc_a_pdev, scc_b_pdev", circumventing the driver framework. Can we get rid of that? 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