Message ID | 20230506141703.65605-1-contact@artur-rojek.eu |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1084841vqo; Sat, 6 May 2023 07:24:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4IsQPIngC13fRCCsqj2Byqh0TvlgS/C5qmfzJ8SSs5oxW5On0Ms5CbBg93TRzYUn7NxiyZ X-Received: by 2002:a17:902:d509:b0:1a6:51a6:ca76 with SMTP id b9-20020a170902d50900b001a651a6ca76mr6131651plg.11.1683383056421; Sat, 06 May 2023 07:24:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683383056; cv=none; d=google.com; s=arc-20160816; b=kgccsI5hbw3DCfnF+5NVWXbKzEtbZoyggTnOao3rkGP0YBTY4CrjWlouKBp2/MNNf8 7/yqrN0wgvcp2fBeQkZnVRmJbm+9T5qO0kqEE1suJ/g+wBwxPfjH2QVjzSZz9LoGdkoF EmTjZkkz5F/42zPvp049i3JVzqJWNbOOJQmVKnGlrZxOZa3zJ3NYGKn7dDGP5vQQs+V3 wqSC6tI4wRXYrYZG5mSXNXA0xYNvQHU/qHEaoIFUF096cX7tZ/19ZSqI3f83hpx3ndUq 4SL86y4wCvDvbCgkVWnVZnXh5djqmBoh4mH40DF9bWPJ/ie6gxEGU9GGWw3MmNDWu3zs bw5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=C5CdW+gHDq38jAvigKT49K28B83XpHUSaKwL3pTbXFg=; b=usvnMZ6d9cfUsDOrr91MXMzNTAVpybjb14/L2bWR0QFlgk5x9AOl+zcnSTIMO5C3m3 7R7ZiAhadw71oVZBRJ/P1tF+A/j4kzk8DNoh8rDDeAInae083iwf3YHhqqXrEu0zi+HH NsmTxFzIHZwQwtHlpyE96DaAv5khx4LtgmjDqRJJbMyjN82pHZ4238FtwUypWoxpey4P Rk97vQeyboCBLA8It9Hndl+DUI2LcIZgkZbUN1MdJdIhNbtjFm1reWzeidSYzK3Nf5lR ZrnAmI3DoXOMeI8TLRUtmnQmSGoSCyRzdkPpFJm3OQSzwjDwcnfIFvwFbqT9YOrWeqf9 x9JQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iw19-20020a170903045300b001a9b4bda723si3758388plb.421.2023.05.06.07.24.00; Sat, 06 May 2023 07:24:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232772AbjEFORv (ORCPT <rfc822;baris.duru.linux@gmail.com> + 99 others); Sat, 6 May 2023 10:17:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231892AbjEFORs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 6 May 2023 10:17:48 -0400 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 184291992E; Sat, 6 May 2023 07:17:37 -0700 (PDT) Received: (Authenticated sender: contact@artur-rojek.eu) by mail.gandi.net (Postfix) with ESMTPSA id BAD5E20007; Sat, 6 May 2023 14:17:34 +0000 (UTC) From: Artur Rojek <contact@artur-rojek.eu> To: Yoshinori Sato <ysato@users.sourceforge.jp>, Rich Felker <dalias@libc.org>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Cc: Rafael Ignacio Zurita <rafaelignacio.zurita@gmail.com>, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Artur Rojek <contact@artur-rojek.eu> Subject: [PATCH 0/2] SH7709 DMA fixes Date: Sat, 6 May 2023 16:17:01 +0200 Message-Id: <20230506141703.65605-1-contact@artur-rojek.eu> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765155072018797018?= X-GMAIL-MSGID: =?utf-8?q?1765155072018797018?= |
Series | SH7709 DMA fixes | |
Message
Artur Rojek
May 6, 2023, 2:17 p.m. UTC
Hi, this series provides fixes to the SH7709 DMA controller, allowing the HP Jornada 680 palmtop to boot Linux again. To my knowledge, this is the first time in ~14 years someone tests upstream Linux on this device. And with the included patches applied, I'm happy to announce that it still works like a charm. PS. What might be of interest to the sh-linux community, there's further work towards this platform in my pipeline. E.g. I've added support for the HD6446x PCMCIA controller, allowing Jornada 680 to use Ethernet and Wi-Fi cards. However, what prevents proper upstream of such a driver is the crude and antiquated code of the underlying platform base. For example, the HD6446x bridge (`cchips/hd6446x/hd64461.c`) lacks the concept of clocks, preventing the PCMCIA driver from hardware agnostic clock gating. So what I'm looking into next is the cleanup of existing platform code base, bringing it up-to-date with modern kernel APIs. Hopefully it's not trying to bite more than I can chew, but eventually ending up with Device Tree support would be really nice :) Artur Rojek (2): sh: dma: fix `dmaor_read_reg`/`dmaor_write_reg` macros sh: dma: Correct the number of DMA channels in SH7709 arch/sh/drivers/dma/Kconfig | 10 ++++++---- arch/sh/drivers/dma/dma-sh.c | 7 +++++-- 2 files changed, 11 insertions(+), 6 deletions(-)
Comments
Hi Artur! Thanks a lot for your patches! On Sat, 2023-05-06 at 16:17 +0200, Artur Rojek wrote: > this series provides fixes to the SH7709 DMA controller, allowing the HP > Jornada 680 palmtop to boot Linux again. To my knowledge, this is the > first time in ~14 years someone tests upstream Linux on this device. And > with the included patches applied, I'm happy to announce that it still > works like a charm. Wow, that sounds great! I will be happy to review your patches. > PS. What might be of interest to the sh-linux community, there's further > work towards this platform in my pipeline. E.g. I've added support for > the HD6446x PCMCIA controller, allowing Jornada 680 to use Ethernet and > Wi-Fi cards. However, what prevents proper upstream of such a driver is > the crude and antiquated code of the underlying platform base. For > example, the HD6446x bridge (`cchips/hd6446x/hd64461.c`) lacks the > concept of clocks, preventing the PCMCIA driver from hardware agnostic > clock gating. So what I'm looking into next is the cleanup of existing > platform code base, bringing it up-to-date with modern kernel APIs. > Hopefully it's not trying to bite more than I can chew, but eventually > ending up with Device Tree support would be really nice :) Yes, there is still a lot of modernization work to be done for SuperH! Device tree has actually been worked on in the past and there is a patch set by Yoshinori Sato to add support for device tree that got never merged, see [1]. Geert and I are planning to have another look at these patches and see whether we can get them into a shape where they can be merged. Maybe you can help us with that effort. I might not have the time for your patches today, but certainly next week starting Monday. Very much looking forward to reviewing and merging them into my SuperH tree [2]. Adrian > [1] https://lore.kernel.org/all/1467564402-2649-1-git-send-email-ysato@users.sourceforge.jp/ > [2] https://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux.git/
On Sat, May 06, 2023 at 05:25:01PM +0200, John Paul Adrian Glaubitz wrote: > Hi Artur! > > Thanks a lot for your patches! > > On Sat, 2023-05-06 at 16:17 +0200, Artur Rojek wrote: > > this series provides fixes to the SH7709 DMA controller, allowing the HP > > Jornada 680 palmtop to boot Linux again. To my knowledge, this is the > > first time in ~14 years someone tests upstream Linux on this device. And > > with the included patches applied, I'm happy to announce that it still > > works like a charm. > > Wow, that sounds great! I will be happy to review your patches. > > > PS. What might be of interest to the sh-linux community, there's further > > work towards this platform in my pipeline. E.g. I've added support for > > the HD6446x PCMCIA controller, allowing Jornada 680 to use Ethernet and > > Wi-Fi cards. However, what prevents proper upstream of such a driver is > > the crude and antiquated code of the underlying platform base. For > > example, the HD6446x bridge (`cchips/hd6446x/hd64461.c`) lacks the > > concept of clocks, preventing the PCMCIA driver from hardware agnostic > > clock gating. So what I'm looking into next is the cleanup of existing > > platform code base, bringing it up-to-date with modern kernel APIs. > > Hopefully it's not trying to bite more than I can chew, but eventually > > ending up with Device Tree support would be really nice :) > > Yes, there is still a lot of modernization work to be done for SuperH! > > Device tree has actually been worked on in the past and there is a patch > set by Yoshinori Sato to add support for device tree that got never merged, > see [1]. > > Geert and I are planning to have another look at these patches and see whether > we can get them into a shape where they can be merged. Maybe you can help us > with that effort. At one point I tried to rebase these to run on what was (at the time) current, and had partial success -- I got it to start booting with DT under qemu, but my work rebasing the PCI stuff had problems and IIRC prevented getting virtio working -- it was crashing at that stage. If there's interest I can see if I can dig up that rebased branch in case it would be useful to look at. It probably has mistakes but might be a start for looking at what changed out from under the patches that needs to change. Rich
Hi Rich! On Sat, 2023-05-06 at 12:56 -0400, Rich Felker wrote: > At one point I tried to rebase these to run on what was (at the time) > current, and had partial success -- I got it to start booting with DT > under qemu, but my work rebasing the PCI stuff had problems and IIRC > prevented getting virtio working -- it was crashing at that stage. If > there's interest I can see if I can dig up that rebased branch in case > it would be useful to look at. It probably has mistakes but might be a > start for looking at what changed out from under the patches that > needs to change. Yes, there is definitely interest. Apologies for the late reply, I wanted to send an answer earlier but it unfortunately went off my radar. Adrian
Hi Artur! On Sat, 2023-05-06 at 16:17 +0200, Artur Rojek wrote: > this series provides fixes to the SH7709 DMA controller, allowing the HP > Jornada 680 palmtop to boot Linux again. To my knowledge, this is the > first time in ~14 years someone tests upstream Linux on this device. And > with the included patches applied, I'm happy to announce that it still > works like a charm. Your first batch of patches has been merged into Linus' tree now: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c17414a273b81fe4e34e11d69fc30cc8b1431614 > PS. What might be of interest to the sh-linux community, there's further > work towards this platform in my pipeline. E.g. I've added support for > the HD6446x PCMCIA controller, allowing Jornada 680 to use Ethernet and > Wi-Fi cards. However, what prevents proper upstream of such a driver is > the crude and antiquated code of the underlying platform base. For > example, the HD6446x bridge (`cchips/hd6446x/hd64461.c`) lacks the > concept of clocks, preventing the PCMCIA driver from hardware agnostic > clock gating. So what I'm looking into next is the cleanup of existing > platform code base, bringing it up-to-date with modern kernel APIs. > Hopefully it's not trying to bite more than I can chew, but eventually > ending up with Device Tree support would be really nice :) Feel free to start sending in more patches addressing the issues mentioned above. Adrian