All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
       [not found] <503227B5.9070002@basystemes.fr>
@ 2012-08-20 12:35 ` Thierry Bultel
  2012-08-28  6:22   ` Gilles Chanteperdrix
  2012-08-28 12:01   ` Gilles Chanteperdrix
  0 siblings, 2 replies; 17+ messages in thread
From: Thierry Bultel @ 2012-08-20 12:35 UTC (permalink / raw)
  To: xenomai

Hello,
this patch adds support for the CANBUS PCI cards from Advantech
It has been tested on the 1680U (dual channel)
Regards
Thierry

signed-off-by: Thierry Bultel <thierry.bultel@basystemes.fr>
diff -pruN xenomai-2.6.0-orig/ksrc/drivers/can/sja1000/Kconfig xenomai-2.6.0/ksrc/drivers/can/sja1000/Kconfig
--- xenomai-2.6.0-orig/ksrc/drivers/can/sja1000/Kconfig	2011-10-18 20:17:18.000000000 +0200
+++ xenomai-2.6.0/ksrc/drivers/can/sja1000/Kconfig	2012-07-18 17:07:35.378844160 +0200
@@ -41,6 +41,15 @@ config XENO_DRIVERS_CAN_SJA1000_IXXAT_PC
 	the second channel working, Xenomai's shared interrupt support
 	must be enabled.
 
+config XENO_DRIVERS_CAN_SJA1000_ADV_PCI
+	depends on XENO_DRIVERS_CAN_SJA1000 && PCI
+	tristate "ADVANTECH PCI Cards"
+	help
+
+	This driver is for the ADVANTECH PCI cards (1 or more channels)
+	It supports the 1680U and some other ones.
+
+
 config XENO_DRIVERS_CAN_SJA1000_PLX_PCI
 	depends on XENO_DRIVERS_CAN_SJA1000 && PCI
 	tristate "PLX90xx PCI-bridge based Cards"
diff -pruN xenomai-2.6.0-orig/ksrc/drivers/can/sja1000/Makefile xenomai-2.6.0/ksrc/drivers/can/sja1000/Makefile
--- xenomai-2.6.0-orig/ksrc/drivers/can/sja1000/Makefile	2011-10-18 20:17:18.000000000 +0200
+++ xenomai-2.6.0/ksrc/drivers/can/sja1000/Makefile	2012-07-16 14:00:38.682836737 +0200
@@ -9,6 +9,7 @@ obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_PE
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_PEAK_DNG) += xeno_can_peak_dng.o
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_PLX_PCI) += xeno_can_plx_pci.o
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_IXXAT_PCI) += xeno_can_ixxat_pci.o
+obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_ADV_PCI) += xeno_can_adv_pci.o
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_EMS_PCI) += xeno_can_ems_pci.o
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_ESD_PCI) += xeno_can_esd_pci.o
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_ISA) += xeno_can_isa.o
@@ -19,6 +20,7 @@ xeno_can_peak_pci-y := rtcan_peak_pci.o
 xeno_can_peak_dng-y := rtcan_peak_dng.o
 xeno_can_plx_pci-y := rtcan_plx_pci.o
 xeno_can_ixxat_pci-y := rtcan_ixxat_pci.o
+xeno_can_adv_pci-y := rtcan_adv_pci.o
 xeno_can_ems_pci-y := rtcan_ems_pci.o
 xeno_can_esd_pci-y := rtcan_esd_pci.o
 xeno_can_isa-y := rtcan_isa.o
@@ -35,6 +37,7 @@ obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_PE
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_PEAK_DNG) += xeno_can_peak_dng.o 
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_PLX_PCI) += xeno_can_plx_pci.o
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_IXXAT_PCI) += xeno_can_ixxat_pci.o
+obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_ADV_PCI) += xeno_can_adv_pci.o
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_EMS_PCI) += xeno_can_ems_pci.o
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_ESD_PCI) += xeno_can_esd_pci.o
 obj-$(CONFIG_XENO_DRIVERS_CAN_SJA1000_ISA) += xeno_can_isa.o 
@@ -47,6 +50,7 @@ xeno_can_peak_pci-objs := rtcan_peak_pci
 xeno_can_peak_dng-objs := rtcan_peak_dng.o
 xeno_can_plx_pci-objs := rtcan_plx_pci.o
 xeno_can_ixxat_pci-objs := rtcan_ixxat_pci.o
+xeno_can_adv_pci-objs := rtcan_adv_pci.o
 xeno_can_ems_pci-objs := rtcan_ems_pci.o
 xeno_can_esd_pci-objs := rtcan_esd_pci.o
 xeno_can_isa-objs := rtcan_isa.o
@@ -73,6 +77,9 @@ xeno_can_plx_pci.o: $(xeno_can_plx_pci-o
 xeno_can_ixxat_pci.o: $(xeno_can_ixxat_pci-objs)
 	$(LD) -r -o $@ $(xeno_can_ixxat_pci-objs)
 
+xeno_can_adv_pci.o: $(xeno_can_adv_pci-objs)
+	$(LD) -r -o $@ $(xeno_can_adv_pci-objs)
+
 xeno_can_ems_pci.o: $(xeno_can_ems_pci-objs)
 	$(LD) -r -o $@ $(xeno_can_ems_pci-objs)
 
diff -pruN xenomai-2.6.0-orig/ksrc/drivers/can/sja1000/rtcan_adv_pci.c xenomai-2.6.0/ksrc/drivers/can/sja1000/rtcan_adv_pci.c
--- xenomai-2.6.0-orig/ksrc/drivers/can/sja1000/rtcan_adv_pci.c	1970-01-01 01:00:00.000000000 +0100
+++ xenomai-2.6.0/ksrc/drivers/can/sja1000/rtcan_adv_pci.c	2012-08-20 12:22:19.822858413 +0200
@@ -0,0 +1,368 @@
+/*
+ * Copyright (C) 2006 Wolfgang Grandegger <wg@grandegger.com>
+ *
+ * Copyright (C) 2012 Thierry Bultel <thierry.bultel@basystemes.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#include <linux/module.h>
+#include <linux/ioport.h>
+#include <linux/delay.h>
+#include <linux/pci.h>
+#include <linux/io.h>
+
+#include <rtdm/rtdm_driver.h>
+
+#define ADV_PCI_BASE_SIZE	0x80
+
+/* CAN device profile */
+#include <rtdm/rtcan.h>
+#include <rtcan_dev.h>
+#include <rtcan_raw.h>
+#include <rtcan_internal.h>
+#include <rtcan_sja1000.h>
+#include <rtcan_sja1000_regs.h>
+
+#define RTCAN_DEV_NAME "rtcan%d"
+#define RTCAN_DRV_NAME "ADV-PCI-CAN"
+
+static char *adv_pci_board_name = "ADV-PCI";
+
+MODULE_AUTHOR("Thierry Bultel <thierry.bultel@basystemes.fr>");
+MODULE_DESCRIPTION("RTCAN board driver for Advantech PCI cards");
+MODULE_SUPPORTED_DEVICE("ADV-PCI card CAN controller");
+MODULE_LICENSE("GPL");
+
+struct rtcan_adv_pci {
+	struct pci_dev *pci_dev;
+	struct rtcan_device *slave_dev;
+	void __iomem *conf_addr;
+	void __iomem *base_addr;
+};
+
+/*
+ * According to the datasheet,
+ * internal clock is 1/2 of the external oscillator frequency
+ * which is 16 MHz
+ */
+#define ADV_PCI_CAN_CLOCK (16000000 / 2)
+
+/*
+ * Output control register
+  Depends on the board configuration
+ */
+
+#define ADV_PCI_OCR (SJA_OCR_MODE_NORMAL	|\
+		     SJA_OCR_TX0_PUSHPULL	|\
+		     SJA_OCR_TX1_PUSHPULL	|\
+		     SJA_OCR_TX1_INVERT)
+
+/*
+ * In the CDR register, you should set CBP to 1.
+ */
+#define ADV_PCI_CDR (SJA_CDR_CBP | SJA_CDR_CAN_MODE)
+
+#define ADV_PCI_VENDOR_ID 0x13fe
+
+#define CHANNEL_SINGLE 0 /* this is a single channel device */
+#define CHANNEL_MASTER 1 /* multi channel device, this device is master */
+#define CHANNEL_SLAVE  2 /* multi channel device, this is slave */
+
+#define ADV_PCI_DEVICE(device_id)\
+	{ ADV_PCI_VENDOR_ID, device_id, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }
+
+static DEFINE_PCI_DEVICE_TABLE(adv_pci_tbl) = {
+	ADV_PCI_DEVICE(0x1680),
+	ADV_PCI_DEVICE(0x3680),
+	ADV_PCI_DEVICE(0x2052),
+	ADV_PCI_DEVICE(0x1681),
+	ADV_PCI_DEVICE(0xc001),
+	ADV_PCI_DEVICE(0xc002),
+	ADV_PCI_DEVICE(0xc004),
+	ADV_PCI_DEVICE(0xc101),
+	ADV_PCI_DEVICE(0xc102),
+	ADV_PCI_DEVICE(0xc104),
+	/* required last entry */
+	{ }
+};
+
+MODULE_DEVICE_TABLE(pci, adv_pci_tbl);
+
+static u8 rtcan_adv_pci_read_reg(struct rtcan_device *dev, int port)
+{
+	struct rtcan_adv_pci *board = (struct rtcan_adv_pci *)dev->board_priv;
+
+	return ioread8(board->base_addr + port);
+}
+
+static void rtcan_adv_pci_write_reg(struct rtcan_device *dev, int port, u8 data)
+{
+	struct rtcan_adv_pci *board = (struct rtcan_adv_pci *)dev->board_priv;
+
+	iowrite8(data, board->base_addr + port);
+}
+
+static void rtcan_adv_pci_del_chan(struct pci_dev *pdev,
+				   struct rtcan_device *dev)
+{
+	struct rtcan_adv_pci *board;
+
+	if (!dev)
+		return;
+
+	board = (struct rtcan_adv_pci *)dev->board_priv;
+
+	rtcan_sja1000_unregister(dev);
+
+	pci_iounmap(pdev, board->base_addr);
+
+	rtcan_dev_free(dev);
+}
+
+
+static int rtcan_adv_pci_add_chan(struct pci_dev *pdev,
+				  int channel,
+				  unsigned int bar,
+				  unsigned int offset,
+				  struct rtcan_device **master_dev)
+{
+	struct rtcan_device *dev;
+	struct rtcan_sja1000 *chip;
+	struct rtcan_adv_pci *board;
+	void __iomem *base_addr;
+	int ret;
+
+	dev = rtcan_dev_alloc(sizeof(struct rtcan_sja1000),
+			      sizeof(struct rtcan_adv_pci));
+	if (dev == NULL)
+		return -ENOMEM;
+
+	chip = (struct rtcan_sja1000 *)dev->priv;
+	board = (struct rtcan_adv_pci *)dev->board_priv;
+
+	if (channel == CHANNEL_SLAVE) {
+		struct rtcan_adv_pci *master_board =
+			(struct rtcan_adv_pci *)(*master_dev)->board_priv;
+		master_board->slave_dev = dev;
+
+		if (offset)
+			base_addr = master_board->base_addr+offset;
+		else
+			base_addr = pci_iomap(pdev, bar, ADV_PCI_BASE_SIZE);
+			if (!base_addr) {
+				ret = -EIO;
+				goto failure;
+			}
+	} else {
+		base_addr = pci_iomap(pdev, bar, ADV_PCI_BASE_SIZE) + offset;
+		if (!base_addr) {
+			ret = -EIO;
+			goto failure;
+		}
+	}
+
+	board->pci_dev = pdev;
+	board->conf_addr = NULL;
+	board->base_addr = base_addr;
+
+	dev->board_name = adv_pci_board_name;
+
+	chip->read_reg = rtcan_adv_pci_read_reg;
+	chip->write_reg = rtcan_adv_pci_write_reg;
+
+	/* Clock frequency in Hz */
+	dev->can_sys_clock = ADV_PCI_CAN_CLOCK;
+
+	/* Output control register */
+	chip->ocr = ADV_PCI_OCR;
+
+	/* Clock divider register */
+	chip->cdr = ADV_PCI_CDR;
+
+	strncpy(dev->name, RTCAN_DEV_NAME, IFNAMSIZ);
+
+	/* Make sure SJA1000 is in reset mode */
+	chip->write_reg(dev, SJA_MOD, SJA_MOD_RM);
+	/* Set PeliCAN mode */
+	chip->write_reg(dev, SJA_CDR, SJA_CDR_CAN_MODE);
+
+	/* check if mode is set */
+	ret = chip->read_reg(dev, SJA_CDR);
+	if (ret != SJA_CDR_CAN_MODE) {
+		ret = -EIO;
+		goto failure_iounmap;
+	}
+
+	/* Register and setup interrupt handling */
+	chip->irq_flags = RTDM_IRQTYPE_SHARED;
+	chip->irq_num = pdev->irq;
+
+	RTCAN_DBG("%s: base_addr=%p conf_addr=%p irq=%d ocr=%#x cdr=%#x\n",
+		   RTCAN_DRV_NAME, board->base_addr, board->conf_addr,
+		   chip->irq_num, chip->ocr, chip->cdr);
+
+	/* Register SJA1000 device */
+	ret = rtcan_sja1000_register(dev);
+	if (ret) {
+		printk(KERN_ERR "ERROR %d while trying to register SJA1000 device!\n",
+		       ret);
+		goto failure_iounmap;
+	}
+
+	if (channel != CHANNEL_SLAVE)
+		*master_dev = dev;
+
+	return 0;
+
+failure_iounmap:
+	if (channel != CHANNEL_SLAVE || !offset)
+		pci_iounmap(pdev, base_addr);
+failure:
+	rtcan_dev_free(dev);
+
+	return ret;
+}
+
+static int __devinit adv_pci_init_one(struct pci_dev *pdev,
+				      const struct pci_device_id *ent)
+{
+	int ret, channel;
+	unsigned int nb_ports = 0;
+	unsigned int bar = 0;
+	unsigned int bar_flag = 0;
+	unsigned int offset = 0;
+	unsigned int ix;
+
+	struct rtcan_device *master_dev = NULL;
+
+	dev_info(&pdev->dev, "RTCAN Registering card");
+
+	ret = pci_enable_device(pdev);
+	if (ret)
+		goto failure;
+
+	dev_info(&pdev->dev, "RTCAN detected Advantech PCI card at slot #%i\n",
+		 PCI_SLOT(pdev->devfn));
+
+	ret = pci_request_regions(pdev, RTCAN_DRV_NAME);
+	if (ret)
+		goto failure_device;
+
+	switch (pdev->device) {
+	case 0xc001:
+	case 0xc002:
+	case 0xc004:
+	case 0xc101:
+	case 0xc102:
+	case 0xc104:
+		nb_ports = pdev->device & 0x7;
+		offset = 0x100;
+		bar = 0;
+		break;
+	case 0x1680:
+	case 0x2052:
+		nb_ports = 2;
+		bar = 2;
+		bar_flag = 1;
+		break;
+	case 0x1681:
+		nb_ports = 1;
+		bar = 2;
+		bar_flag = 1;
+		break;
+	default:
+		goto failure_regions;
+	}
+
+	if (nb_ports > 1)
+		channel = CHANNEL_MASTER;
+	else
+		channel = CHANNEL_SINGLE;
+
+	RTCAN_DBG("%s: Initializing device %04x:%04x:%04x\n",
+		   RTCAN_DRV_NAME,
+		   pdev->vendor,
+		   pdev->device,
+		   pdev->subsystem_device);
+
+	ret = rtcan_adv_pci_add_chan(pdev, channel, bar, offset, &master_dev);
+	if (ret)
+		goto failure_iounmap;
+
+	/* register slave channel, if any */
+
+	for (ix = 1; ix < nb_ports; ix++) {
+		ret = rtcan_adv_pci_add_chan(pdev,
+					     CHANNEL_SLAVE,
+					     bar + (bar_flag ? ix : 0),
+					     offset * ix,
+					     &master_dev);
+		if (ret)
+			goto failure_iounmap;
+	}
+
+	pci_set_drvdata(pdev, master_dev);
+
+	return 0;
+
+failure_iounmap:
+	if (master_dev)
+		rtcan_adv_pci_del_chan(pdev, master_dev);
+
+failure_regions:
+	pci_release_regions(pdev);
+
+failure_device:
+	pci_disable_device(pdev);
+
+failure:
+	return ret;
+}
+
+static void __devexit adv_pci_remove_one(struct pci_dev *pdev)
+{
+	struct rtcan_device *dev = pci_get_drvdata(pdev);
+	struct rtcan_adv_pci *board = (struct rtcan_adv_pci *)dev->board_priv;
+
+	if (board->slave_dev)
+		rtcan_adv_pci_del_chan(pdev, board->slave_dev);
+
+	rtcan_adv_pci_del_chan(pdev, dev);
+
+	pci_release_regions(pdev);
+	pci_disable_device(pdev);
+	pci_set_drvdata(pdev, NULL);
+}
+
+static struct pci_driver rtcan_adv_pci_driver = {
+	.name = RTCAN_DRV_NAME,
+	.id_table = adv_pci_tbl,
+	.probe = adv_pci_init_one,
+	.remove = __devexit_p(adv_pci_remove_one),
+};
+
+static int __init rtcan_adv_pci_init(void)
+{
+	return pci_register_driver(&rtcan_adv_pci_driver);
+}
+
+static void __exit rtcan_adv_pci_exit(void)
+{
+	pci_unregister_driver(&rtcan_adv_pci_driver);
+}
+
+module_init(rtcan_adv_pci_init);
+module_exit(rtcan_adv_pci_exit);





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-08-20 12:35 ` [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards Thierry Bultel
@ 2012-08-28  6:22   ` Gilles Chanteperdrix
  2012-08-28  7:17     ` Wolfgang Grandegger
  2012-08-28 12:01   ` Gilles Chanteperdrix
  1 sibling, 1 reply; 17+ messages in thread
From: Gilles Chanteperdrix @ 2012-08-28  6:22 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Thierry Bultel, xenomai

On 08/20/2012 02:35 PM, Thierry Bultel wrote:

> Hello,
> this patch adds support for the CANBUS PCI cards from Advantech
> It has been tested on the 1680U (dual channel)
> Regards
> Thierry


Wolfgang, are you OK with this patch?

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-08-28  6:22   ` Gilles Chanteperdrix
@ 2012-08-28  7:17     ` Wolfgang Grandegger
       [not found]       ` <503C758B.9000906@wanadoo.fr>
  0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Grandegger @ 2012-08-28  7:17 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Thierry Bultel, Wolfgang Grandegger, xenomai

On 08/28/2012 08:22 AM, Gilles Chanteperdrix wrote:
> On 08/20/2012 02:35 PM, Thierry Bultel wrote:
> 
>> Hello,
>> this patch adds support for the CANBUS PCI cards from Advantech
>> It has been tested on the 1680U (dual channel)
>> Regards
>> Thierry
> 
> 
> Wolfgang, are you OK with this patch?

Oops, missed that patch. Yes, looks good now. You can add my

Acked-by: Wolfgang Grandegger <wg@grandegger.com>

Thanks,

Wolfgang.




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-08-20 12:35 ` [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards Thierry Bultel
  2012-08-28  6:22   ` Gilles Chanteperdrix
@ 2012-08-28 12:01   ` Gilles Chanteperdrix
  1 sibling, 0 replies; 17+ messages in thread
From: Gilles Chanteperdrix @ 2012-08-28 12:01 UTC (permalink / raw)
  To: Thierry Bultel; +Cc: xenomai

On 08/20/2012 02:35 PM, Thierry Bultel wrote:

> Hello,
> this patch adds support for the CANBUS PCI cards from Advantech
> It has been tested on the 1680U (dual channel)
> Regards
> Thierry


Merged, thanks. I just edited a bit the text to make it look more like a
commit message. If you want to send a "cover letter", you should send a
separate e-mail, otherwise the cover letter ends up in the git logs.

Regards.

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
       [not found]           ` <50744BD3.1030703@wanadoo.fr>
@ 2012-10-09 19:34             ` Wolfgang Grandegger
  2012-10-09 19:37               ` Gilles Chanteperdrix
  2012-10-09 20:21               ` Thierry Bultel
  0 siblings, 2 replies; 17+ messages in thread
From: Wolfgang Grandegger @ 2012-10-09 19:34 UTC (permalink / raw)
  To: Thierry Bultel; +Cc: Xenomai

Hi Thierry,

please do not drop the CC to the Xenomai mailing list.

On 10/09/2012 06:07 PM, Thierry Bultel wrote:
> 
>>> Do you still plan to add the flexcan RTDM ?
>> I have already something running but it's not yet good enough for
>> mainline. Will need more time. Anyway, I could send my preliminary
>> patches in case you are interested, especially to test them.
> Hi Wolfgang,
> How are you ?
> 
> I should receive my devkit for iMX6 in 2 weeks, and immediately start on
> first applying the ipipe patch to it (the provided kernel is likely to
> be the 3.2 from Freescale,
> with some little modifications), and then work on the flexcan rtdm driver.

Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
Concerning the iPipe patches I think you have currently no other choice.

> If you have the flexcan not achieved yet, and if you still agree to send
> it to me,
> that is fine, I would be pleased to test it.

I have posted the patch two weeks ago to this mailing list:

http://www.xenomai.org/pipermail/xenomai/2012-September/026337.html

Would be nice if you could test it on i.MX6 as well. Awaiting your
"Tested-by".

Wolfgang.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-10-09 19:34             ` Wolfgang Grandegger
@ 2012-10-09 19:37               ` Gilles Chanteperdrix
  2012-10-09 20:21               ` Thierry Bultel
  1 sibling, 0 replies; 17+ messages in thread
From: Gilles Chanteperdrix @ 2012-10-09 19:37 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Thierry Bultel, Xenomai

On 10/09/2012 09:34 PM, Wolfgang Grandegger wrote:

> Hi Thierry,
> 
> please do not drop the CC to the Xenomai mailing list.
> 
> On 10/09/2012 06:07 PM, Thierry Bultel wrote:
>>
>>>> Do you still plan to add the flexcan RTDM ?
>>> I have already something running but it's not yet good enough for
>>> mainline. Will need more time. Anyway, I could send my preliminary
>>> patches in case you are interested, especially to test them.
>> Hi Wolfgang,
>> How are you ?
>>
>> I should receive my devkit for iMX6 in 2 weeks, and immediately start on
>> first applying the ipipe patch to it (the provided kernel is likely to
>> be the 3.2 from Freescale,
>> with some little modifications), and then work on the flexcan rtdm driver.
> 
> Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
> 3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
> git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
> Concerning the iPipe patches I think you have currently no other choice.
> 
>> If you have the flexcan not achieved yet, and if you still agree to send
>> it to me,
>> that is fine, I would be pleased to test it.
> 
> I have posted the patch two weeks ago to this mailing list:
> 
> http://www.xenomai.org/pipermail/xenomai/2012-September/026337.html
> 
> Would be nice if you could test it on i.MX6 as well. Awaiting your
> "Tested-by".


Missed that, sorry, merged and pushed.

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-10-09 19:34             ` Wolfgang Grandegger
  2012-10-09 19:37               ` Gilles Chanteperdrix
@ 2012-10-09 20:21               ` Thierry Bultel
  2012-10-09 20:52                 ` Gilles Chanteperdrix
                                   ` (2 more replies)
  1 sibling, 3 replies; 17+ messages in thread
From: Thierry Bultel @ 2012-10-09 20:21 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Xenomai

Le 09/10/2012 21:34, Wolfgang Grandegger a écrit :
> Hi Thierry,
>
> please do not drop the CC to the Xenomai mailing list.

ok, sorry

>
> On 10/09/2012 06:07 PM, Thierry Bultel wrote:
>>>> Do you still plan to add the flexcan RTDM ?
>>> I have already something running but it's not yet good enough for
>>> mainline. Will need more time. Anyway, I could send my preliminary
>>> patches in case you are interested, especially to test them.
>> Hi Wolfgang,
>> How are you ?
>>
>> I should receive my devkit for iMX6 in 2 weeks, and immediately start on
>> first applying the ipipe patch to it (the provided kernel is likely to
>> be the 3.2 from Freescale,
>> with some little modifications), and then work on the flexcan rtdm driver.
> Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
> 3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
> git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
> Concerning the iPipe patches I think you have currently no other choice.

The SOM manufacturer is announcing a 3.2.x kernel for the iMX6.
My understanding is that they take Freescale one and bring their BSP specific changes.
I will see. In my plan there is the (hopefully not) ipipe port stuff.


For 3.0.36, I see that there is MXC specific patching (pre and post scheme)
But the README says that the latest ipipe patches are on http://download.gna.org/adeos/patches/v3.x/arm/

At that location, there is a single ipipe-core-3.2.21-arm-1.patch
That does not fit for the iMX6 / and freescale kernel ?

I think I need some clarification.

>
>> If you have the flexcan not achieved yet, and if you still agree to send
>> it to me,
>> that is fine, I would be pleased to test it.
> I have posted the patch two weeks ago to this mailing list:
>
> http://www.xenomai.org/pipermail/xenomai/2012-September/026337.html
>
> Would be nice if you could test it on i.MX6 as well. Awaiting your
> "Tested-by".

I will do so; and keep you informed of the results asap.
Thanks
Thierry

>
> Wolfgang.
>
>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-10-09 20:21               ` Thierry Bultel
@ 2012-10-09 20:52                 ` Gilles Chanteperdrix
  2012-10-11  6:43                 ` Thierry Bultel
  2012-10-11  6:58                 ` Wolfgang Grandegger
  2 siblings, 0 replies; 17+ messages in thread
From: Gilles Chanteperdrix @ 2012-10-09 20:52 UTC (permalink / raw)
  To: Thierry Bultel; +Cc: Xenomai

On 10/09/2012 10:21 PM, Thierry Bultel wrote:

> Le 09/10/2012 21:34, Wolfgang Grandegger a écrit :
>> Hi Thierry,
>>
>> please do not drop the CC to the Xenomai mailing list.
> 
> ok, sorry
> 
>>
>> On 10/09/2012 06:07 PM, Thierry Bultel wrote:
>>>>> Do you still plan to add the flexcan RTDM ?
>>>> I have already something running but it's not yet good enough for
>>>> mainline. Will need more time. Anyway, I could send my preliminary
>>>> patches in case you are interested, especially to test them.
>>> Hi Wolfgang,
>>> How are you ?
>>>
>>> I should receive my devkit for iMX6 in 2 weeks, and immediately start on
>>> first applying the ipipe patch to it (the provided kernel is likely to
>>> be the 3.2 from Freescale,
>>> with some little modifications), and then work on the flexcan rtdm driver.
>> Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
>> 3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
>> git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
>> Concerning the iPipe patches I think you have currently no other choice.
> 
> The SOM manufacturer is announcing a 3.2.x kernel for the iMX6.
> My understanding is that they take Freescale one and bring their BSP specific changes.
> I will see. In my plan there is the (hopefully not) ipipe port stuff.
> 
> 
> For 3.0.36, I see that there is MXC specific patching (pre and post scheme)
> But the README says that the latest ipipe patches are on http://download.gna.org/adeos/patches/v3.x/arm/
> 
> At that location, there is a single ipipe-core-3.2.21-arm-1.patch
> That does not fit for the iMX6 / and freescale kernel ?
> 
> I think I need some clarification.


Well, it simply means that the new patches have not been copied on the
I-pipe repository.

You can download the latest version at this location:
http://www.xenomai.org/~gch/pub/mxc/3.0.43/

-- 
                                                                Gilles.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-10-09 20:21               ` Thierry Bultel
  2012-10-09 20:52                 ` Gilles Chanteperdrix
@ 2012-10-11  6:43                 ` Thierry Bultel
  2012-10-11  7:08                   ` Wolfgang Grandegger
  2012-10-11  7:08                   ` Gilles Chanteperdrix
  2012-10-11  6:58                 ` Wolfgang Grandegger
  2 siblings, 2 replies; 17+ messages in thread
From: Thierry Bultel @ 2012-10-11  6:43 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Xenomai

Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
>> 3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
>> git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
>> Concerning the iPipe patches I think you have currently no other choice.
>


In both cases, (latest one from Freescale, or 3.4 from mainline) there is currently
no available matching ipipe patch.
I do not know if the latest kernel from mainline will fit for the reference board that I will receive.

I do not realize the amount of work for porting either
- ipipe-core-3.2.21-arm.patch to 3.4 (mainline)
or
- adeos-ipipe-3.0.43-* to the latest (which one ?) kernel from Freescale

About that latest option I am a little bit puzzled.
Namely from what I know, Freescale kernels are on

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/refs/heads
and the latest published 3.x kernel is ... a 3.0.15_12 that has not moved for months.
Thanks for clarifying

Thierry



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-10-09 20:21               ` Thierry Bultel
  2012-10-09 20:52                 ` Gilles Chanteperdrix
  2012-10-11  6:43                 ` Thierry Bultel
@ 2012-10-11  6:58                 ` Wolfgang Grandegger
  2 siblings, 0 replies; 17+ messages in thread
From: Wolfgang Grandegger @ 2012-10-11  6:58 UTC (permalink / raw)
  To: Thierry Bultel; +Cc: Xenomai

On 10/09/2012 10:21 PM, Thierry Bultel wrote:
> Le 09/10/2012 21:34, Wolfgang Grandegger a écrit :
>> Hi Thierry,
>>
>> please do not drop the CC to the Xenomai mailing list.
> 
> ok, sorry
> 
>>
>> On 10/09/2012 06:07 PM, Thierry Bultel wrote:
>>>>> Do you still plan to add the flexcan RTDM ?
>>>> I have already something running but it's not yet good enough for
>>>> mainline. Will need more time. Anyway, I could send my preliminary
>>>> patches in case you are interested, especially to test them.
>>> Hi Wolfgang,
>>> How are you ?
>>>
>>> I should receive my devkit for iMX6 in 2 weeks, and immediately start on
>>> first applying the ipipe patch to it (the provided kernel is likely to
>>> be the 3.2 from Freescale,
>>> with some little modifications), and then work on the flexcan rtdm
>>> driver.
>> Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
>> 3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
>> git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
>> Concerning the iPipe patches I think you have currently no other choice.
> 
> The SOM manufacturer is announcing a 3.2.x kernel for the iMX6.
> My understanding is that they take Freescale one and bring their BSP
> specific changes.

I don't know of a v3.2.x from Freescale. Maybe it's the Linaro kernel.

> I will see. In my plan there is the (hopefully not) ipipe port stuff.
> 
> 
> For 3.0.36, I see that there is MXC specific patching (pre and post scheme)
> But the README says that the latest ipipe patches are on
> http://download.gna.org/adeos/patches/v3.x/arm/

The patches I mentioned are not yet in the official trees.

> At that location, there is a single ipipe-core-3.2.21-arm-1.patch
> That does not fit for the iMX6 / and freescale kernel ?

I'm afraid the patch it will not apply to the kernel you have in mind.
Let's wait and see what you get. Maybe it's simpler to port over the
board specific stuff to v3.4 or even higher.

> I think I need some clarification.
>>
>>> If you have the flexcan not achieved yet, and if you still agree to send
>>> it to me,
>>> that is fine, I would be pleased to test it.
>> I have posted the patch two weeks ago to this mailing list:
>>
>> http://www.xenomai.org/pipermail/xenomai/2012-September/026337.html
>>
>> Would be nice if you could test it on i.MX6 as well. Awaiting your
>> "Tested-by".
> 
> I will do so; and keep you informed of the results asap.

Thanks,

Wolfgang.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-10-11  6:43                 ` Thierry Bultel
@ 2012-10-11  7:08                   ` Wolfgang Grandegger
  2012-10-11  7:21                     ` Thierry Bultel
  2012-10-11  7:08                   ` Gilles Chanteperdrix
  1 sibling, 1 reply; 17+ messages in thread
From: Wolfgang Grandegger @ 2012-10-11  7:08 UTC (permalink / raw)
  To: Thierry Bultel; +Cc: Xenomai

On 10/11/2012 08:43 AM, Thierry Bultel wrote:
> Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
>>> 3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
>>> git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
>>> Concerning the iPipe patches I think you have currently no other choice.
>>
> 
> 
> In both cases, (latest one from Freescale, or 3.4 from mainline) there
> is currently
> no available matching ipipe patch.

Don't worry, there are. See below.

> I do not know if the latest kernel from mainline will fit for the
> reference board that I will receive.
> 
> I do not realize the amount of work for porting either
> - ipipe-core-3.2.21-arm.patch to 3.4 (mainline)
> or
> - adeos-ipipe-3.0.43-* to the latest (which one ?) kernel from Freescale
> 
> About that latest option I am a little bit puzzled.
> Namely from what I know, Freescale kernels are on
> 
> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/refs/heads
> and the latest published 3.x kernel is ... a 3.0.15_12 that has not
> moved for months.

There is a rather new release. Check the tags! As I said, we have
Xenomai running for the SabreLite and Nitrohen6x board with the 3.0.36
Kernel from Freescale (rel_imx_3.0.35_12.09.02 from
git.freecale.com/linux-2.6) and with mainline Linux 3.4.6.

But we still don't know what Freescale will release when the i.MX6 goes
public. See:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&fsrch=1&sr=5.


What board do you plan to use?

Wolfgang.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-10-11  6:43                 ` Thierry Bultel
  2012-10-11  7:08                   ` Wolfgang Grandegger
@ 2012-10-11  7:08                   ` Gilles Chanteperdrix
  2012-10-16 10:11                     ` Thierry Bultel
  1 sibling, 1 reply; 17+ messages in thread
From: Gilles Chanteperdrix @ 2012-10-11  7:08 UTC (permalink / raw)
  To: Thierry Bultel; +Cc: Xenomai

On 10/11/2012 08:43 AM, Thierry Bultel wrote:

> Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
>>> 3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
>>> git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
>>> Concerning the iPipe patches I think you have currently no other choice.
>>
> 
> 
> In both cases, (latest one from Freescale, or 3.4 from mainline) there is currently
> no available matching ipipe patch.
> I do not know if the latest kernel from mainline will fit for the reference board that I will receive.
> 
> I do not realize the amount of work for porting either
> - ipipe-core-3.2.21-arm.patch to 3.4 (mainline)
> or
> - adeos-ipipe-3.0.43-* to the latest (which one ?) kernel from Freescale
> 
> About that latest option I am a little bit puzzled.
> Namely from what I know, Freescale kernels are on
> 
> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/refs/heads
> and the latest published 3.x kernel is ... a 3.0.15_12 that has not moved for months.
> Thanks for clarifying


The 3.4 patch is working for arm, I still have some issues, but it is
already usable:

git://git.xenomai.org/ipipe-gch.git branch for-core-3.4

For now, you simply have to avoid THUMB user-space binaries (but you can
compile the kernel with CONFIG_THUMB2_KERNEL, and it results in lower
latencies from what I measured).

It works on the sabre board "out-of-the-box". I suspect, starting with
core-3.4, we have no additional work to do to work with any cortex a9
based processor (except, as I already said, for some old cortex a9
revisions without a global timer, but that is not the case of the imx6q
I tested).

-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-10-11  7:08                   ` Wolfgang Grandegger
@ 2012-10-11  7:21                     ` Thierry Bultel
  0 siblings, 0 replies; 17+ messages in thread
From: Thierry Bultel @ 2012-10-11  7:21 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Xenomai

Le 11/10/2012 09:08, Wolfgang Grandegger a écrit :
> On 10/11/2012 08:43 AM, Thierry Bultel wrote:
>> Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
>>>> 3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
>>>> git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
>>>> Concerning the iPipe patches I think you have currently no other choice.
>>
>> In both cases, (latest one from Freescale, or 3.4 from mainline) there
>> is currently
>> no available matching ipipe patch.
> Don't worry, there are. See below.
>
>> I do not know if the latest kernel from mainline will fit for the
>> reference board that I will receive.
>>
>> I do not realize the amount of work for porting either
>> - ipipe-core-3.2.21-arm.patch to 3.4 (mainline)
>> or
>> - adeos-ipipe-3.0.43-* to the latest (which one ?) kernel from Freescale
>>
>> About that latest option I am a little bit puzzled.
>> Namely from what I know, Freescale kernels are on
>>
>> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/refs/heads
>> and the latest published 3.x kernel is ... a 3.0.15_12 that has not
>> moved for months.
> There is a rather new release. Check the tags!

ok, I had missed it

> As I said, we have
> Xenomai running for the SabreLite and Nitrohen6x board with the 3.0.36
> Kernel from Freescale (rel_imx_3.0.35_12.09.02 from
> git.freecale.com/linux-2.6) and with mainline Linux 3.4.6.
>
> But we still don't know what Freescale will release when the i.MX6 goes
> public. See:
> http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX6Q&fsrch=1&sr=5.
>
I will try again to get the information fro, the manufacturer

> What board do you plan to use?

The reference board of the SOM manufacturer is the Lothron http://www.emtrion.com/dimm_lothron_en.php
I have been told that it is based on an official one from Freescale but I do not know which one.


>
> Wolfgang.
>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-10-11  7:08                   ` Gilles Chanteperdrix
@ 2012-10-16 10:11                     ` Thierry Bultel
  2012-10-16 10:41                       ` Wolfgang Grandegger
  0 siblings, 1 reply; 17+ messages in thread
From: Thierry Bultel @ 2012-10-16 10:11 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: Xenomai

Le 11/10/2012 09:08, Gilles Chanteperdrix a écrit :
> On 10/11/2012 08:43 AM, Thierry Bultel wrote:
>
>> Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
>>>> 3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
>>>> git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
>>>> Concerning the iPipe patches I think you have currently no other choice.
>>
>> In both cases, (latest one from Freescale, or 3.4 from mainline) there is currently
>> no available matching ipipe patch.
>> I do not know if the latest kernel from mainline will fit for the reference board that I will receive.
>>
>> I do not realize the amount of work for porting either
>> - ipipe-core-3.2.21-arm.patch to 3.4 (mainline)
>> or
>> - adeos-ipipe-3.0.43-* to the latest (which one ?) kernel from Freescale
>>
>> About that latest option I am a little bit puzzled.
>> Namely from what I know, Freescale kernels are on
>>
>> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/refs/heads
>> and the latest published 3.x kernel is ... a 3.0.15_12 that has not moved for months.
>> Thanks for clarifying
>
> The 3.4 patch is working for arm, I still have some issues, but it is
> already usable:
>
> git://git.xenomai.org/ipipe-gch.git branch for-core-3.4
>
> For now, you simply have to avoid THUMB user-space binaries (but you can
> compile the kernel with CONFIG_THUMB2_KERNEL, and it results in lower
> latencies from what I measured).
>
> It works on the sabre board "out-of-the-box". I suspect, starting with
> core-3.4, we have no additional work to do to work with any cortex a9
> based processor (except, as I already said, for some old cortex a9
> revisions without a global timer, but that is not the case of the imx6q
> I tested).
>

AFAIK, my DevKit should finally come with a 3.0.35 kernel
How difficult would it be to apply the adeos-ipipe-3.0.43- patches on it ?
It is feasible ?

Thanks
Thierry



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-10-16 10:11                     ` Thierry Bultel
@ 2012-10-16 10:41                       ` Wolfgang Grandegger
  2012-10-16 11:07                         ` Thierry Bultel
  0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Grandegger @ 2012-10-16 10:41 UTC (permalink / raw)
  To: Thierry Bultel; +Cc: Xenomai

On 10/16/2012 12:11 PM, Thierry Bultel wrote:
> Le 11/10/2012 09:08, Gilles Chanteperdrix a écrit :
>> On 10/11/2012 08:43 AM, Thierry Bultel wrote:
>>
>>> Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
>>>>> 3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
>>>>> git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
>>>>> Concerning the iPipe patches I think you have currently no other
>>>>> choice.
>>>
>>> In both cases, (latest one from Freescale, or 3.4 from mainline)
>>> there is currently
>>> no available matching ipipe patch.
>>> I do not know if the latest kernel from mainline will fit for the
>>> reference board that I will receive.
>>>
>>> I do not realize the amount of work for porting either
>>> - ipipe-core-3.2.21-arm.patch to 3.4 (mainline)
>>> or
>>> - adeos-ipipe-3.0.43-* to the latest (which one ?) kernel from Freescale
>>>
>>> About that latest option I am a little bit puzzled.
>>> Namely from what I know, Freescale kernels are on
>>>
>>> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/refs/heads
>>> and the latest published 3.x kernel is ... a 3.0.15_12 that has not
>>> moved for months.
>>> Thanks for clarifying
>>
>> The 3.4 patch is working for arm, I still have some issues, but it is
>> already usable:
>>
>> git://git.xenomai.org/ipipe-gch.git branch for-core-3.4
>>
>> For now, you simply have to avoid THUMB user-space binaries (but you can
>> compile the kernel with CONFIG_THUMB2_KERNEL, and it results in lower
>> latencies from what I measured).
>>
>> It works on the sabre board "out-of-the-box". I suspect, starting with
>> core-3.4, we have no additional work to do to work with any cortex a9
>> based processor (except, as I already said, for some old cortex a9
>> revisions without a global timer, but that is not the case of the imx6q
>> I tested).
>>
> 
> AFAIK, my DevKit should finally come with a 3.0.35 kernel
> How difficult would it be to apply the adeos-ipipe-3.0.43- patches on it ?
> It is feasible ?

Very likely that kernel is based on Freescale's 3.0.35, which already
has Xenomai support. If so, the patches should apply without problems.

Wolfgang.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-10-16 10:41                       ` Wolfgang Grandegger
@ 2012-10-16 11:07                         ` Thierry Bultel
  2012-10-16 11:42                           ` Wolfgang Grandegger
  0 siblings, 1 reply; 17+ messages in thread
From: Thierry Bultel @ 2012-10-16 11:07 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: Xenomai

Le 16/10/2012 12:41, Wolfgang Grandegger a écrit :
> On 10/16/2012 12:11 PM, Thierry Bultel wrote:
>> Le 11/10/2012 09:08, Gilles Chanteperdrix a écrit :
>>> On 10/11/2012 08:43 AM, Thierry Bultel wrote:
>>>
>>>> Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
>>>>>> 3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
>>>>>> git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
>>>>>> Concerning the iPipe patches I think you have currently no other
>>>>>> choice.
>>>> In both cases, (latest one from Freescale, or 3.4 from mainline)
>>>> there is currently
>>>> no available matching ipipe patch.
>>>> I do not know if the latest kernel from mainline will fit for the
>>>> reference board that I will receive.
>>>>
>>>> I do not realize the amount of work for porting either
>>>> - ipipe-core-3.2.21-arm.patch to 3.4 (mainline)
>>>> or
>>>> - adeos-ipipe-3.0.43-* to the latest (which one ?) kernel from Freescale
>>>>
>>>> About that latest option I am a little bit puzzled.
>>>> Namely from what I know, Freescale kernels are on
>>>>
>>>> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/refs/heads
>>>> and the latest published 3.x kernel is ... a 3.0.15_12 that has not
>>>> moved for months.
>>>> Thanks for clarifying
>>> The 3.4 patch is working for arm, I still have some issues, but it is
>>> already usable:
>>>
>>> git://git.xenomai.org/ipipe-gch.git branch for-core-3.4
>>>
>>> For now, you simply have to avoid THUMB user-space binaries (but you can
>>> compile the kernel with CONFIG_THUMB2_KERNEL, and it results in lower
>>> latencies from what I measured).
>>>
>>> It works on the sabre board "out-of-the-box". I suspect, starting with
>>> core-3.4, we have no additional work to do to work with any cortex a9
>>> based processor (except, as I already said, for some old cortex a9
>>> revisions without a global timer, but that is not the case of the imx6q
>>> I tested).
>>>
>> AFAIK, my DevKit should finally come with a 3.0.35 kernel
>> How difficult would it be to apply the adeos-ipipe-3.0.43- patches on it ?
>> It is feasible ?
> Very likely that kernel is based on Freescale's 3.0.35, which already
> has Xenomai support.

yes, 'almost' because the closest available ipipe is actually the 3.0.36.
I do not realize yet what the better strategy is; either upgrade the provided
kernel to 3.0.36 of force the patch to apply on 3.0.35

Thierry

>   If so, the patches should apply without problems.
>
> Wolfgang.
>
>



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards
  2012-10-16 11:07                         ` Thierry Bultel
@ 2012-10-16 11:42                           ` Wolfgang Grandegger
  0 siblings, 0 replies; 17+ messages in thread
From: Wolfgang Grandegger @ 2012-10-16 11:42 UTC (permalink / raw)
  To: Thierry Bultel; +Cc: Xenomai

On 10/16/2012 01:07 PM, Thierry Bultel wrote:
> Le 16/10/2012 12:41, Wolfgang Grandegger a écrit :
>> On 10/16/2012 12:11 PM, Thierry Bultel wrote:
>>> Le 11/10/2012 09:08, Gilles Chanteperdrix a écrit :
>>>> On 10/11/2012 08:43 AM, Thierry Bultel wrote:
>>>>
>>>>> Why v3.2 from Freescale? For the SabreLite or Nitrohen6x I know about
>>>>>>> 3.0.36 from Freescale (rel_imx_3.0.35_12.09.02 from
>>>>>>> git.freecale.com/linux-2.6) or, much better, mainline Linux 3.4.
>>>>>>> Concerning the iPipe patches I think you have currently no other
>>>>>>> choice.
>>>>> In both cases, (latest one from Freescale, or 3.4 from mainline)
>>>>> there is currently
>>>>> no available matching ipipe patch.
>>>>> I do not know if the latest kernel from mainline will fit for the
>>>>> reference board that I will receive.
>>>>>
>>>>> I do not realize the amount of work for porting either
>>>>> - ipipe-core-3.2.21-arm.patch to 3.4 (mainline)
>>>>> or
>>>>> - adeos-ipipe-3.0.43-* to the latest (which one ?) kernel from
>>>>> Freescale
>>>>>
>>>>> About that latest option I am a little bit puzzled.
>>>>> Namely from what I know, Freescale kernels are on
>>>>>
>>>>> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/refs/heads
>>>>> and the latest published 3.x kernel is ... a 3.0.15_12 that has not
>>>>> moved for months.
>>>>> Thanks for clarifying
>>>> The 3.4 patch is working for arm, I still have some issues, but it is
>>>> already usable:
>>>>
>>>> git://git.xenomai.org/ipipe-gch.git branch for-core-3.4
>>>>
>>>> For now, you simply have to avoid THUMB user-space binaries (but you
>>>> can
>>>> compile the kernel with CONFIG_THUMB2_KERNEL, and it results in lower
>>>> latencies from what I measured).
>>>>
>>>> It works on the sabre board "out-of-the-box". I suspect, starting with
>>>> core-3.4, we have no additional work to do to work with any cortex a9
>>>> based processor (except, as I already said, for some old cortex a9
>>>> revisions without a global timer, but that is not the case of the imx6q
>>>> I tested).
>>>>
>>> AFAIK, my DevKit should finally come with a 3.0.35 kernel
>>> How difficult would it be to apply the adeos-ipipe-3.0.43- patches on
>>> it ?
>>> It is feasible ?
>> Very likely that kernel is based on Freescale's 3.0.35, which already
>> has Xenomai support.
> 
> yes, 'almost' because the closest available ipipe is actually the 3.0.36.
> I do not realize yet what the better strategy is; either upgrade the
> provided
> kernel to 3.0.36 of force the patch to apply on 3.0.35

As Gilles already said, the patches for this kernel are in:

 ttp://www.xenomai.org/~gch/pub/mxc/3.0.43/

To be more precise, these patches are for Freescale's kernel release tag
"rel_imx_3.0.35_12.09.02" from git://git.freecale.com/linux-2.6.

Wolfgang.



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-10-16 11:42 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <503227B5.9070002@basystemes.fr>
2012-08-20 12:35 ` [Xenomai] [PATCH] rtcan: driver for the Advantech PCI cards Thierry Bultel
2012-08-28  6:22   ` Gilles Chanteperdrix
2012-08-28  7:17     ` Wolfgang Grandegger
     [not found]       ` <503C758B.9000906@wanadoo.fr>
     [not found]         ` <503C7D77.2060209@grandegger.com>
     [not found]           ` <50744BD3.1030703@wanadoo.fr>
2012-10-09 19:34             ` Wolfgang Grandegger
2012-10-09 19:37               ` Gilles Chanteperdrix
2012-10-09 20:21               ` Thierry Bultel
2012-10-09 20:52                 ` Gilles Chanteperdrix
2012-10-11  6:43                 ` Thierry Bultel
2012-10-11  7:08                   ` Wolfgang Grandegger
2012-10-11  7:21                     ` Thierry Bultel
2012-10-11  7:08                   ` Gilles Chanteperdrix
2012-10-16 10:11                     ` Thierry Bultel
2012-10-16 10:41                       ` Wolfgang Grandegger
2012-10-16 11:07                         ` Thierry Bultel
2012-10-16 11:42                           ` Wolfgang Grandegger
2012-10-11  6:58                 ` Wolfgang Grandegger
2012-08-28 12:01   ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.