Xilinx framebuffer

2 messages, 2 authors, 2009-03-26 · open the first message on its own page

Xilinx framebuffer

From: <hidden>
Date: 2009-03-26 11:28:15

Hi all,

My name is Pablo and I am a new subscriber of this list.

I have seen many post here related to the framebuffer driver  
'xilinxfb.c' and I hope you can solve some doubts that I have about it.

I am actually trying to generate a uClinux core for my Virtex4  
development kit, which uses Microblaze and has a Xilinx TFT controller  
IP core (which I have tested and it works correctly).

When it comes to boot the kernel, I have used some printk() functions  
to follow the execution flow because I am quite unexperienced in  
device drivers. I have seen something strange in silinxfb.c, and I  
would like you to tell me if this is a common error of begginer users.  
The issue is that I added printk() in the following parts of  
'xilinxfb.c':

/* ---------------------------------------------------------------------
   * Module setup and teardown
  */

  static int __init
  xilinxfb_init(void)
  {
          int rc;
	printk("step 1\n");
          rc = xilinxfb_of_register();
	printk("step 2\n");
          if (rc)
                  return rc;
  	printk("step 3\n");
          rc = platform_driver_register(&xilinxfb_platform_driver);
	printk("step 4, devuelve rc: %d\n",rc);

          if (rc)
                  xilinxfb_of_unregister();
	printk("step 5\n");

          return rc;
  }

I also added printk() in:

/* ---------------------------------------------------------------------
   * Platform bus binding
   */

  static int
  xilinxfb_platform_probe(struct platform_device *pdev)
  {
          struct xilinxfb_platform_data *pdata;
          struct resource *res;
  	printk("step 7\n");
          /* Find the registers address */
          res = platform_get_resource(pdev, IORESOURCE_IO, 0);
          if (!res) {
                  dev_err(&pdev->dev, "Couldn't get registers resource\n");
                  return -ENODEV;
          }

Checking the message on the console when the system boots, I can see  
the following:

io scheduler deadline registered
io scheduler cfq registered (default)
step 1
step 2
step 3
step 4
paso 5
xgpio0 #0 at 0x81400000 mapped to 0x81400000 device: 10,185 not using IRQ
xgpio1 #1 at 0x81420000 mapped to 0x81420000 device: 10,186 not using IRQ

I think this means that the function xilinxfb_platform_probe() in  
'xilinxfb.c' is not being executed and, as a consequence, either  
xilinxfb_assing() is. It seems logic because there are no message  
about the framebuffer in the boot log (in xilinxfb_assign there are  
some dev_dbg() functions that should show this information messages).

Do you have any idea about why this is happening? Other devices like  
xgpio are recognized by the kernel and the structure of the drivers is  
similar to the one used in xilinxfb.c. Moreover, in my uClinux system  
I can see the following:

# ls sys/bus/platform/drivers/
i8042        uartlite     xilinx_gpio  xilinxfb
# ls sys/bus/platform/devices/
i8042          uartlite.0     xilinx_gpio.0  xilinx_gpio.1

The driver is in the folder but there are no fb0 devices.

Any hint about all this would be very helpful.

Thank you very much.

Kind Regards,

Pablo Colodron



------------------------------------------------------------------------------

Re: Xilinx framebuffer

From: Krzysztof Helt <hidden>
Date: 2009-03-26 17:49:55

Hi Pablo,


On Thu, 26 Mar 2009 12:28:00 +0100
pcolodron@uvigo.es wrote:
Hi all,

My name is Pablo and I am a new subscriber of this list.

I have seen many post here related to the framebuffer driver  
'xilinxfb.c' and I hope you can solve some doubts that I have about it.

I am actually trying to generate a uClinux core for my Virtex4  
development kit, which uses Microblaze and has a Xilinx TFT controller  
IP core (which I have tested and it works correctly).

When it comes to boot the kernel, I have used some printk() functions  
to follow the execution flow because I am quite unexperienced in  
device drivers. I have seen something strange in silinxfb.c, and I  
would like you to tell me if this is a common error of begginer users.  
The issue is that I added printk() in the following parts of  
'xilinxfb.c':
(... )
Checking the message on the console when the system boots, I can see  
the following:

io scheduler deadline registered
io scheduler cfq registered (default)
step 1
step 2
step 3
step 4
paso 5
xgpio0 #0 at 0x81400000 mapped to 0x81400000 device: 10,185 not using IRQ
xgpio1 #1 at 0x81420000 mapped to 0x81420000 device: 10,186 not using IRQ

I think this means that the function xilinxfb_platform_probe() in  
'xilinxfb.c' is not being executed and, as a consequence, either  
xilinxfb_assing() is. It seems logic because there are no message  
about the framebuffer in the boot log (in xilinxfb_assign there are  
some dev_dbg() functions that should show this information messages).

Do you have any idea about why this is happening? Other devices like  
xgpio are recognized by the kernel and the structure of the drivers is  
similar to the one used in xilinxfb.c. Moreover, in my uClinux system  
I can see the following:

# ls sys/bus/platform/drivers/
i8042        uartlite     xilinx_gpio  xilinxfb
# ls sys/bus/platform/devices/
i8042          uartlite.0     xilinx_gpio.0  xilinx_gpio.1
The xilinxfb_init function is called if only the xilinxfb driver is loaded or during kernel boot if 
it is compiled into the kernel.

The xilinxfb_probe function is called if you registered a correct xilinxfb platform device.
Can you post a part of your device definition file which contains  a definition of the xilinxfb 
platform device?

The error seems to be in your platform definition. You have to register a correct platform device
for the xilinxfb. Then the probe function will be called.

Regards,
Krzysztof


----------------------------------------------------------------------
Udar sloneczny prezesa Kaczynskiego... >>> http://link.interia.pl/f2083


------------------------------------------------------------------------------
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help