From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31179 invoked by alias); 16 Aug 2007 16:32:30 -0000 Received: (qmail 31004 invoked by uid 22791); 16 Aug 2007 16:32:29 -0000 X-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_05,DK_POLICY_SIGNSOME X-Spam-Check-By: sourceware.org Received: from quina.moeckel.org (HELO quina.moeckel.org) (217.160.223.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 16 Aug 2007 16:32:18 +0000 Received: from bluebird.headcrashers.bnfh (bluebird.headcrashers.org [IPv6:2001:8d8:81:a11:204:acff:fe97:190]) (authenticated bits=0) by quina.moeckel.org (8.13.8/8.13.8/Debian-3) with ESMTP id l7GGW9BY006955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 16 Aug 2007 18:32:10 +0200 Received: from executor.headcrashers.bnfh (IDENT:root@executor.headcrashers.bnfh [IPv6:2001:8d8:81:a11:209:6bff:fee0:8244]) by bluebird.headcrashers.bnfh (8.13.8/8.13.8) with ESMTP id l7GGW9XK023680 for ; Thu, 16 Aug 2007 18:32:09 +0200 Received: from executor.headcrashers.bnfh (IDENT:woodstoc@localhost [127.0.0.1]) by executor.headcrashers.bnfh (8.13.8/8.13.8) with ESMTP id l7GGVQQj018431 for ; Thu, 16 Aug 2007 18:31:26 +0200 (CEST) Received: (from woodstoc@localhost) by executor.headcrashers.bnfh (8.13.8/8.13.8/Submit) id l7GGVQFI001482 for ecos-patches@ecos.sourceware.org; Thu, 16 Aug 2007 18:31:26 +0200 (CEST) Date: Thu, 16 Aug 2007 16:32:00 -0000 From: Hans Rosenfeld To: ecos-patches@ecos.sourceware.org Subject: LPC2xxx CAN bugfixes Message-ID: <20070816163126.GA17087@grumpf.hope-2000.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on quina.moeckel.org X-Virus-Checked: Checked by ClamAV on sourceware.org X-IsSubscribed: yes Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2007-08/txt/msg00019.txt.bz2 --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 449 There are two bugs in the CAN driver for the LPC2xxx. One is in include/can_lpc2xxx_baudrates.h: numbers shouldn't be prefixed with 0 if they aren't intended to be interpreted as octal. I fixed this only where it actually breaks, but the rest should be changed, too. The other is in src/can_lpc2xxx.c, the definition of "info" is missing when only one CAN channel is configured. -- %SYSTEM-F-ANARCHISM, The operating system has been overthrown --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="can_lpc2xxx.diff" Content-length: 683 Index: can_lpc2xxx.c =================================================================== RCS file: /cvs/ecos/ecos/packages/devs/can/arm/lpc2xxx/current/src/can_lpc2xxx.c,v retrieving revision 1.3 diff -u -r1.3 can_lpc2xxx.c --- can_lpc2xxx.c 2 Aug 2007 08:48:00 -0000 1.3 +++ can_lpc2xxx.c 16 Aug 2007 16:20:29 -0000 @@ -928,7 +928,7 @@ static Cyg_ErrNo lpc2xxx_can_lookup(struct cyg_devtab_entry** tab, struct cyg_devtab_entry* sub_tab, const char* name) { can_channel* chan = (can_channel*) (*tab)->priv; - CAN_DECLARE_INFO(chan); + lpc2xxx_can_info_t *info = (lpc2xxx_can_info_t *)chan->dev_priv; cyg_uint32 regval; chan->callbacks->can_init(chan); --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="can_lpc2xxx_baudrates.diff" Content-length: 824 Index: can_lpc2xxx_baudrates.h =================================================================== RCS file: /cvs/ecos/ecos/packages/devs/can/arm/lpc2xxx/current/include/can_lpc2xxx_baudrates.h,v retrieving revision 1.2 diff -u -r1.2 can_lpc2xxx_baudrates.h --- can_lpc2xxx_baudrates.h 31 Jul 2007 07:53:36 -0000 1.2 +++ can_lpc2xxx_baudrates.h 16 Aug 2007 16:30:55 -0000 @@ -118,7 +118,7 @@ CAN_BR_TBL_ENTRY(59, 15, 07, 0, 1), // 10 kbaud CAN_BR_TBL_ENTRY(49, 11, 01, 0, 1), // 20 kbaud CAN_BR_TBL_ENTRY(19, 11, 01, 0, 1), // 50 kbaud - CAN_BR_TBL_ENTRY(09, 11, 01, 0, 1), // 100 kbaud + CAN_BR_TBL_ENTRY( 9, 11, 01, 0, 1), // 100 kbaud CAN_BR_TBL_ENTRY(07, 11, 01, 0, 1), // 125 kbaud CAN_BR_TBL_ENTRY(03, 11, 01, 0, 1), // 250 kbaud CAN_BR_TBL_ENTRY(01, 11, 01, 0, 0), // 500 kbaud --7AUc2qLy4jB3hD7Z--