diff --git a/ChangeLog b/ChangeLog
index 38e1d6d8..d54ae3d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-26  Joerg Wunsch <j.gnu@uriah.heep.sax.de>
+
+	Submitted by Mikael Hermansson:
+	* avrdude.conf.in (ATxmega256A3): new device.
+	* stk500v2 (stk500v2_initialize): Enable the AVRISPmkII as a
+	PDI-capable device for ATxmega parts.
+
 2009-02-25  Joerg Wunsch <j.gnu@uriah.heep.sax.de>
 
 	Submitted by Lars Immisch:
diff --git a/NEWS b/NEWS
index e7a53f26..4614c075 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ Current:
       - ATmega128RFA1
       - ATxmega128A1 rev D
       - ATxmega128A1
+      - ATxmega256A3
 
   * New programmers supported:
 
@@ -42,7 +43,7 @@ Current:
     respectively.
 
   * Add support for ATxmega128A1 (including the revision D engineering
-    samples) for STK600 tools using PDI
+    samples) for STK600 and AVRISPmkII tools using PDI
 
   * The option combination -tF now enters terminal mode even if the
     device initialization failed, so the user can modify programmer
diff --git a/avrdude.conf.in b/avrdude.conf.in
index 64a465d2..009ac21c 100644
--- a/avrdude.conf.in
+++ b/avrdude.conf.in
@@ -13796,3 +13796,77 @@ part
       ;
 
   ;
+
+#------------------------------------------------------------
+# ATxmega256A3
+#------------------------------------------------------------
+
+part
+    id               = "x256a3";
+    desc             = "ATXMEGA256A3";
+    signature        = 0x1E 0x98 0x42;
+    has_jtag         = yes;
+    has_pdi          = yes;
+    nvm_base         = 0x01C0;
+
+    memory "eeprom"
+        page_size       = 32;
+        size            = 4096;
+      ;
+
+    memory "flash"
+        size            = 0x40000;
+        page_size       = 512;
+      ;
+
+    memory "boot"
+        size            = 0x2000;
+        page_size       = 512;
+      ;
+
+# signature is actually in IO address space
+    memory "signature"
+        size            = 3;
+        offset          = 0x90;
+      ;
+
+    memory "fuse0"
+        size            = 1;
+        offset          = 0x20;
+      ;
+
+    memory "fuse1"
+        size            = 1;
+        offset          = 0x21;
+      ;
+
+    memory "fuse2"
+        size            = 1;
+        offset          = 0x22;
+      ;
+
+    memory "fuse4"
+        size            = 1;
+        offset          = 0x24;
+      ;
+
+    memory "fuse5"
+        size            = 1;
+        offset          = 0x25;
+      ;
+
+    memory "lockbits"
+        size            = 1;
+        offset          = 0x27;
+      ;
+
+    memory "calibration"
+        size            = 512;
+      ;
+
+    memory "usersig"
+        size            = 512;
+        offset          = 0x200;
+      ;
+
+  ;
diff --git a/stk500v2.c b/stk500v2.c
index eae0412f..62a8d7ff 100644
--- a/stk500v2.c
+++ b/stk500v2.c
@@ -1006,8 +1006,8 @@ static int stk500hvsp_program_enable(PROGRAMMER * pgm, AVRPART * p)
 static int stk500v2_initialize(PROGRAMMER * pgm, AVRPART * p)
 {
 
-  if (PDATA(pgm)->pgmtype == PGMTYPE_STK600 &&
-      (p->flags & AVRPART_HAS_PDI) != 0) {
+  if ((PDATA(pgm)->pgmtype == PGMTYPE_STK600 || PDATA(pgm)->pgmtype == PGMTYPE_AVRISP_MKII) != 0
+     && (p->flags & AVRPART_HAS_PDI) != 0) {
     /*
      * This is an ATxmega device, must use XPROG protocol for the
      * remaining actions.