• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: [1]
1  Linux Stuff / Kernel / Re: Enabling UART1 to facilitate a 2nd serial interface/ttyS1 on: January 16, 2010, 10:03:49 PM
Hey Jon,

Thanks for your response!  Is the mvBoardEnvSpec.h object something that didnt make it out of the Feroceon tree?  I have been building against mainline and orion, not Feroceon, and I dont recall coming across it when I was digging around in orion?


EDIT:  I found it in 2.6.22.18...


THNX!
SLR-
2  Linux Stuff / Kernel / Re: Enabling UART1 to facilitate a 2nd serial interface/ttyS1 on: January 16, 2010, 05:53:41 PM

Is there no one with any input on this?  Any insight at all, no matter how small,  would be greatly appreciated!

Maybe I am posting in the wrong forum  ...should this be in hardware?


SLR-


3  Linux Stuff / Kernel / Enabling UART1 to facilitate a 2nd serial interface/ttyS1 on: January 14, 2010, 07:12:32 PM
I am having problems enabling UART1 on the sheva board.
Any help on getting UART1 working would be greatly appreciated!


What I have tried:
The chips mpp 13 and 14 are muxed SDIO and UART1 and correspond to the SDIO pins 2 and 7.

I have built a custom u-boot that enables mpp 13 and 14 for UART1 ( modified sheevaplug.c ) -
Modified MMP13 and 14:
Change from
                MPP13_SD_CMD,
                MPP14_SD_D0,

            -to-

      MPP13_UART1_TXD,
                MPP14_UART1_RXD,

---
---

I have also built a kernel (2.6.23RC2)  that I have customized to enable UART1:

I patched the following three objects:
 arch/arm/mach-kirkwood/sheevaplug-setup.c
 arch/arm/plat-orion/include/plat/mvsdio.h 
 drivers/mmc/host/mvsdio.c                 
 

sheevaplug-setup.c:

@@ static struct mvsdio_platform_data sheevaplug_mvsdio_data = {
+   .gpio_enable = 34,       /* MPP34 is the UART1/SDIO switch */
+   .gpio_enable_value = 0, /* bit switch, 0 disables SDIO */

 
 
@@ static unsigned int sheevaplug_mpp_config[] __initdata = {
+   MPP13_UART1_TXD,   /* Set to UART1 */
+   MPP14_UART1_RXD,   /* Set to UART1 */
+   MPP34_GPIO,         /* SD_UART1_SEL */
 
 
 
mvsdio.h:
@@ struct mvsdio_platform_data {

+   int gpio_enable;
+   int gpio_enable_value;



mvsdio.c:
@@ struct mvsd_host {
+   int gpio_enable;
+   int gpio_enable_value;

 

@@ static void mvsd_power_up(struct mvsd_host *host)
+   gpio_set_value(host->gpio_enable, host->gpio_enable_value);



@@ static void mvsd_power_down(struct mvsd_host *host)
+   gpio_set_value(host->gpio_enable, !host->gpio_enable_value);



@@ out:
+      if (host->gpio_enable)
+         gpio_free(host->gpio_enable);


NOTE: This 'if' stanza was already patched in this file as well, which looks like it may probing - which may be a problem for me ( I explain this further down ).
@@ static int __init mvsd_probe(struct platform_device *pdev)
   if (mvsd_data->gpio_enable) {
      ret = gpio_request(mvsd_data->gpio_enable,
               DRIVER_NAME " enable");
      if (ret) {
          printk(KERN_ERR "%s: cannot reserve GPIO %d (enable)\n",
            DRIVER_NAME, mvsd_data->gpio_enable);
          goto out;
      }
      ret = gpio_direction_output(mvsd_data->gpio_enable,
                   !mvsd_data->gpio_enable);
      if (ret) {
          printk(KERN_ERR "%s: cannot configure GPO %d (enable)\n",
            DRIVER_NAME, mvsd_data->gpio_enable);
          gpio_free(mvsd_data->gpio_enable);
          goto out;
      }
      host->gpio_enable = mvsd_data->gpio_enable;
      host->gpio_enable_value = mvsd_data->gpio_enable_value;
   }


---
---

-The u-boot builds and runs fine.

-The kernel builds and runs fine.

-I am now able to connect to the ttyS1 file descriptor without any I/O errors.

Problem:
When I probe the SDIO pins 2(TXD) and 7(RXD) there is a signal polling the SDIO pin2 (which is bussed to the mpp13 );  I thought I turned the SDIO off by switching mpp34, but it seems like something is still polling/probing the interface at a regular interval.

So, I have obviously done this wrong.

THE QUESTION!?

How do I enable the UART1 interface and get it working with ttyS1?
What changes to both u-boot and the kernel are needed?
...or, any resources you may think will help me in this endeavor.

THANKS!
SLR-
4  General Category / General Discussion / Re: Using modified u-boot with installer bricks the sheevaplug on: December 30, 2009, 10:51:26 PM

Actually, I think this may simply be a matter of changing the entry points for the uboot-env and .bin. 

I remember there being a patch to the installer at some point, though it was targeted at enabling openuboot builds and the Marvell git isnt built from openuboot - IIRC.

Rooster ( or Rabeeh, or anyone intimate with the code base ), is it indeed the case that the block addressing just needs to be changed? sheevaplug_reflash_uboot/sheevaplug_reflash_uboot_env? 



5  General Category / General Discussion / Re: --* Ubuntu Network Installation *-- on: October 03, 2009, 03:23:51 PM

The messages echoed during your 'net install' seem to elude to the absence of both a kernel ("there is no kernel to install - click continue") and associated modules ("Lack of kernel module - choose to continue without those").
It seems you will need to install them independent of the net install.

Assuming the net install process got the SD card prepared for installation, i.e. partitioned and formated ( there should be two partitions, one ext2 and the second an ext3 ); you can check the partition table by running
cat /proc/partitions

You should see two partitions on the sd card, something like:
179        1       3928 mmcblk0p1
179        2    3868320 mmcblk0p2

If one or both of these device nodes dont exist, you will need to make them and format them.

If they both exist, and are mounted, they should have populated file systems under them, i.e. there should be a bunch of directories and other file objects in them;  if this is the case, you can copy the modules and kernel image to them and you should be good to go, however, if they are not mounted you will need to mount them both to copy the needed files to them.

If you dont already have the kernel and modules on a USB stick, either manually select and download the kernel image and associated modules that you want, or grab the installer package (sheevaplug-installer-v1.0.tar.gz) @ http://www.plugcomputer.org/index.php/us/resources/downloads?func=select&id=5 and uncompress it somewhere on your PC and then copy all the files from the 'installer' directory to a USB stick/thumb drive.

...now you can put the thumb drive in the Sheeva Plug and mount it.

As mentioned above, if the two partitions on the SD card arent mounted, you need to mount them and copy the modules and kernel files to them, for example, mount partition 2 ( mmcblk0p2 ) and copy the modules file into it ( if there isnt already a full root filesystem on this partition, ie the directories etc, bin, usr, var, etcetera, then you need to also copy the rootfs file to this partition and unpack it):

mount /dev/mmcblk0p2 /mnt  ( assuming you didnt already mount the USB thumb drive at /mnt, but at somewhere else, like /media)

cp /media/rootfs*.tgz   /mnt
cp /media/modules*.tgz   /mnt
 
Now cd to /mnt and unpack both files

Now unmount partition two of the sd card and mount partition one in its place:

umount /mnt
mount /dev/mmcblk0p1 /mnt


Copy the kernel image to partition 1:

cp /media/uImage   /mnt

...reboot and you should be ok, assuming all that was missing was the modules and kernel image :/


SLR-




Pages: [1]