For a simple test program (user space), use mmap (addresses of the relevant registers are in AT91SAM9260.h, download from somewhere) and just change the register values.
Read all of the manuals (preferably several times). MCU manual is here:
http://www.atmel.com/dyn/resources/prod_documents/doc6221.pdf.
Read every single forum post (there are only like 6 pages, it won't take that long). Basically every question has already been asked and answered here.
To get various peripherals working you will likely need to make sure the correct one has access to the pins via the parallel input/output controller and also has power via the power management controller.
To get anything useful done, I would suggest reading the book "Linux Device Drivers," available (I think) for free online somewhere.